Owen Anderson
5b9400d6bd
I just fail today.
...
Hopefully this fixes the last build errors on systems with GCC < 4.1.
llvm-svn: 72179
2009-05-20 19:01:50 +00:00
Owen Anderson
04911b4fee
Copy-and-paste-o.
...
llvm-svn: 72177
2009-05-20 18:47:53 +00:00
Owen Anderson
e5370f409b
Move atomic operations' definitions out of line. While this seems kind of silly,
...
all kinds of problems caused by including windows.h and/or config.h in an LLVM header.
llvm-svn: 72174
2009-05-20 18:26:15 +00:00
Bob Wilson
dd0e23610a
Minor formatting fixes.
...
llvm-svn: 72172
2009-05-20 16:30:25 +00:00
Duncan Sands
e6aab9096f
When comparing DominanceFrontier's, advance iterators
...
before erasing nodes, not after. Otherwise dom frontier
checking reads from freed memory.
llvm-svn: 72168
2009-05-20 15:12:01 +00:00
Owen Anderson
c473c81202
Compile fix for MSVC.
...
llvm-svn: 72167
2009-05-20 09:34:13 +00:00
Eli Friedman
9030c35eb4
Fix for PR4235: to build a floating-point value from integer parts,
...
build an integer and cast that to a float. This fixes a crash
caused by trying to split an f32 into two f16's.
This changes the behavior in test/CodeGen/XCore/fneg.ll because that
testcase now triggers a DAGCombine which converts the fneg into an integer
operation. If someone is interested, it's probably possible to tweak
the test to generate an actual fneg.
llvm-svn: 72162
2009-05-20 06:02:09 +00:00
Evan Cheng
1fbc2a4754
Fix test on non-darwin hosts.
...
llvm-svn: 72161
2009-05-20 05:45:36 +00:00
Evan Cheng
960983371c
Try again. Allow call to immediate address for ELF or when in static relocation mode.
...
llvm-svn: 72160
2009-05-20 04:53:57 +00:00
Evan Cheng
61da18645b
Cannot use immediate as call absolute target in PIC mode.
...
llvm-svn: 72154
2009-05-20 01:11:00 +00:00
Dan Gohman
9cbf850506
Teach SCEV::isLoopInvariant and SCEV::hasComputableLoopEvolution
...
about the convention from LoopInfo that a null Loop* means the entire
function body.
llvm-svn: 72152
2009-05-20 01:01:24 +00:00
Owen Anderson
b9a4a57699
Add llvm_start_multithreaded(), which starts up the LLVM internals in thread-safe mode. Provide double-check locking
...
initialization of ManagedStatic's when running in thread-safe mode.
llvm-svn: 72151
2009-05-20 00:39:20 +00:00
Dan Gohman
7248923a5d
Suppress the IV reversal transformation in the case that the RHS
...
of the comparison is defined inside the loop. This fixes a
use-before-def problem, because the transformation puts a use
of the RHS outside the loop.
llvm-svn: 72149
2009-05-20 00:34:08 +00:00
Owen Anderson
414dc16ab9
We need to include config.h here so that the #defines are set properly.
...
llvm-svn: 72148
2009-05-20 00:31:29 +00:00
Owen Anderson
8cf4718fcd
Forgot this file in my last commit.
...
llvm-svn: 72141
2009-05-19 22:25:55 +00:00
Owen Anderson
af5db8335b
Split the ENABLE_THREADS #define in two. Now ENABLE_THREADS indicates the ability to run multiple threads at once in the JIT, and requires only
...
mutex support. LLVM_MULTITHREADED indicates (or will indicate) the ability to run LLVM itself across multiple threads, and requires atomics support.
llvm-svn: 72140
2009-05-19 22:18:56 +00:00
Bob Wilson
335fa435dd
Fix pr4227: Handle large immediate values in inline assembly.
...
llvm-svn: 72138
2009-05-19 21:27:57 +00:00
Dan Gohman
67587ce2e9
Remove an irrelevant comment.
...
llvm-svn: 72132
2009-05-19 20:38:47 +00:00
Dan Gohman
97f70add3c
Add some more comments to the top of this file.
...
llvm-svn: 72131
2009-05-19 20:37:36 +00:00
Dan Gohman
adc70d6806
Trim unneeded #includes.
...
llvm-svn: 72130
2009-05-19 20:35:26 +00:00
Dan Gohman
d33a090efa
Make SCEVCallbackVH a private nested class inside ScalarEvolution, as
...
it's an implementation detail.
llvm-svn: 72122
2009-05-19 19:22:47 +00:00
Dan Gohman
7a97e933cd
Create ConstantExpr GEPs the correct way. This fixes
...
MultiSource/Benchmarks/Prolangs-C/football and a variety of other
failures.
llvm-svn: 72120
2009-05-19 19:18:01 +00:00
Bob Wilson
840e3281ff
Follow up on new support for memory operands in ARM inline assembly.
...
This fixes pr4233.
llvm-svn: 72115
2009-05-19 18:33:02 +00:00
Bill Wendling
670da9a22a
Forward decls.
...
llvm-svn: 72114
2009-05-19 17:52:31 +00:00
Bill Wendling
a3b8e84a57
Remove 'class' specifier.
...
llvm-svn: 72113
2009-05-19 17:51:26 +00:00
Bill Wendling
a8705a95a6
Fix to compile on VS2008.
...
llvm-svn: 72112
2009-05-19 17:50:18 +00:00
Bob Wilson
e666cc5206
Fix pr4058 and pr4059. Do not split i64 or double arguments between r3 and
...
the stack. Patch by Sandeep Patel.
llvm-svn: 72106
2009-05-19 10:02:36 +00:00
Bob Wilson
a2c462bbe9
Fix pr4091: Add support for "m" constraint in ARM inline assembly.
...
llvm-svn: 72105
2009-05-19 05:53:42 +00:00
Dan Gohman
d697a2dd8e
Remove the #ifndef NDEBUG from the FastISel debugging options. This
...
fixes dejagnu tests that use these options.
llvm-svn: 72094
2009-05-19 02:19:57 +00:00
Dan Gohman
2649491f9c
Teach SCEVExpander to expand arithmetic involving pointers into GEP
...
instructions. It attempts to create high-level multi-operand GEPs,
though in cases where this isn't possible it falls back to casting
the pointer to i8* and emitting a GEP with that. Using GEP instructions
instead of ptrtoint+arithmetic+inttoptr helps pointer analyses that
don't use ScalarEvolution, such as BasicAliasAnalysis.
Also, make the AddrModeMatcher more aggressive in handling GEPs.
Previously it assumed that operand 0 of a GEP would require a register
in almost all cases. It now does extra checking and can do more
matching if operand 0 of the GEP is foldable. This fixes a problem
that was exposed by SCEVExpander using GEPs.
llvm-svn: 72093
2009-05-19 02:15:55 +00:00
Cristian Cadar
1e059f6080
Test commit.
...
llvm-svn: 72092
2009-05-19 01:56:08 +00:00
Dan Gohman
62070faac4
Add some comments noting how IndVarSimplify facilitates
...
LoopInfo functionality.
llvm-svn: 72091
2009-05-19 01:52:46 +00:00
Owen Anderson
6359122668
Make using an unsupported CAS size a hard error on Windows.
...
llvm-svn: 72088
2009-05-19 01:08:36 +00:00
Owen Anderson
b11bfb360d
Fix up the Windows portion of Atomic.h. This is untested, but it is my best understanding of what should work.
...
I'd be much obliged if someone on MSVC++ could try this out and let me know if it works.
llvm-svn: 72087
2009-05-19 01:07:40 +00:00
Owen Anderson
8e41adcc4d
Template CompareAndSwap function.
...
llvm-svn: 72086
2009-05-19 01:02:27 +00:00
Dale Johannesen
5668077271
Spacing fix.
...
llvm-svn: 72083
2009-05-19 00:46:42 +00:00
Mike Stump
ebf04f2843
Fix cmake builds.
...
llvm-svn: 72078
2009-05-19 00:18:14 +00:00
Owen Anderson
36a70867f4
Now that we have atomics support properly detected by configure,
...
use it to implement Atomic.h.
This expunges the code previously imported from libatomic_ops.
llvm-svn: 72077
2009-05-19 00:08:29 +00:00
Owen Anderson
b9509c55fe
Test for the presence of GCC atomic builtins at configure time. If not found,
...
disable building LLVM in thread-safe mode and print a nice warning.
Regenerate configure for these changes.
llvm-svn: 72075
2009-05-18 23:58:51 +00:00
Daniel Dunbar
2068647926
Add -submit-aux option to NewNightlyTest.pl
...
- If given, the argument will be run using system with the path to the sent
data. Useful for testing nightlytest server replacements.
llvm-svn: 72070
2009-05-18 23:24:26 +00:00
Bill Wendling
ec78f1516d
Don't set the "location" information for inlined functions' variables.
...
llvm-svn: 72064
2009-05-18 23:08:55 +00:00
Bill Wendling
1992f86733
Small code cleanup.
...
llvm-svn: 72057
2009-05-18 22:33:01 +00:00
Dan Gohman
479858749b
Update a comment to reflect changes in the surrounding code.
...
llvm-svn: 72051
2009-05-18 22:15:25 +00:00
Evan Cheng
e87bd1d8f7
Add short descriptions of 'implicit' and 'parallel'.
...
llvm-svn: 72050
2009-05-18 22:14:45 +00:00
Bill Wendling
bc308569a3
RecordVariable is called each time a DECLARE node is encountered. For an inlined
...
function, this could be many, many times. We don't want to re-add variables to
that DIE for each time. We just want to add them once. Check to make sure that
we haven't added them already.
llvm-svn: 72047
2009-05-18 22:02:36 +00:00
Dale Johannesen
74503f0b31
Add OpSize to 16-bit ADC and SBB.
...
llvm-svn: 72045
2009-05-18 21:41:59 +00:00
Argyrios Kyrtzidis
1bf0fc8301
Add missing file.
...
llvm-svn: 72042
2009-05-18 21:08:45 +00:00
Argyrios Kyrtzidis
c65c525617
Allow the JIT ExecutionEngine to report details about the generated machine code.
...
Introduce a new class (MachineCodeInfo) that the JIT can fill in with details. Right now, just the address and the size of the machine code are reported.
Patch by Evan Phoenix!
llvm-svn: 72040
2009-05-18 21:06:40 +00:00
Bob Wilson
d9145fca7f
Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return value
...
correctly indicates whether it changed the code.
llvm-svn: 72038
2009-05-18 21:02:18 +00:00
Bob Wilson
320d54a2d8
Fix pr4202: Disable CodePlacementOpt for ARM. The ARMConstantIslandPass has
...
to run last because it needs to know the exact size and position of every
basic block. Currently CodePlacementOpt is set up to run last. It might be
worthwhile to investigate reordering these passes, but for now, let's just
make it work.
llvm-svn: 72037
2009-05-18 20:55:32 +00:00
Lang Hames
cf47d0134f
New Spiller interface and trivial implementation.
...
llvm-svn: 72030
2009-05-18 19:03:16 +00:00
Dan Gohman
f0974de75e
Revert r72025. It is possible for clients to convert between signed types
...
and pointer types safely if they only do so when the sizes are the same.
llvm-gcc is such a client.
llvm-svn: 72029
2009-05-18 18:55:39 +00:00
Eric Christopher
8089763f48
Remove getType() overrides for ExtractValueInst and InsertValueInst.
...
Patch by John McCall.
llvm-svn: 72028
2009-05-18 18:46:57 +00:00
Bill Wendling
d2dc9063d7
Revert last commit. It was wrong.
...
llvm-svn: 72026
2009-05-18 18:21:03 +00:00
Dan Gohman
32912cbf65
Add assertions to CastInst::getCastOpcode to catch attempted conversions
...
between integers and pointers when the source type is marked signed,
since inttoptr and ptrtoint always use zero-extension when the destination
is larger than the source.
llvm-svn: 72025
2009-05-18 18:18:57 +00:00
Bill Wendling
af7e400fda
Don't call RegionInlinedFnEnd if our optimization level isn't -O0.
...
llvm-svn: 72024
2009-05-18 18:17:22 +00:00
Bill Wendling
b17990999f
Commands beginning with '--' are converted to '-f' by gcc. Blech!
...
llvm-svn: 72023
2009-05-18 18:09:36 +00:00
Dale Johannesen
1df0e80380
Fill in the missing patterns for ADC and SBB.
...
Some comment cleanup.
llvm-svn: 72022
2009-05-18 17:44:15 +00:00
Douglas Gregor
b81294d989
termios.h contains the winsize structure we need to determine the
...
width of a terminal. Don't try to get the width of a terminal if we
don't have this header.
llvm-svn: 72018
2009-05-18 17:21:34 +00:00
Dan Gohman
14d1339579
Rename UseTy to AccessTy, for consistency with getAccessType, and to
...
avoid ambiguity with the word "use" in IVStrideUse.
llvm-svn: 72012
2009-05-18 16:45:28 +00:00
Daniel Dunbar
a8c1658619
Silence Release-Asserts warnings.
...
llvm-svn: 72011
2009-05-18 16:43:04 +00:00
Dan Gohman
6350296efc
Teach ScalarEvolution to recognize x^-1 in the case where non-demanded
...
bits have been stripped out by instcombine.
llvm-svn: 72010
2009-05-18 16:29:04 +00:00
Dan Gohman
d277a1ed49
Delete a redundant 'else'.
...
llvm-svn: 72009
2009-05-18 16:17:44 +00:00
Dan Gohman
9cf09f8291
Fix ScalarEvolution::isLoopGuardedByCond to accept a null Loop*, for
...
consistency with other routines that use a null Loop* to mean code
not contained by any loop.
llvm-svn: 72008
2009-05-18 16:03:58 +00:00
Dan Gohman
4fc3668a92
Minor code cleanups. Do more of the work before the if statements
...
instead of within their controlling expressions.
llvm-svn: 72007
2009-05-18 15:58:39 +00:00
Dan Gohman
d33f36e23b
Add assertion checks to the SCEV operator creation methods to catch
...
type mismatches.
llvm-svn: 72006
2009-05-18 15:44:58 +00:00
Dan Gohman
8c77f1a275
Make ScalarEvolution::isLoopGuardedByCond work even when the edge
...
entering a loop is a non-split critical edge.
llvm-svn: 72004
2009-05-18 15:36:09 +00:00
Dan Gohman
ba7f6d8276
Add an isOne() utility function to ScalarEvolution, similar to isZero()
...
and similar to ConstantInt's isOne().
llvm-svn: 72003
2009-05-18 15:22:39 +00:00
Dan Gohman
b81dd48fd2
Add nounwind to a few tests.
...
llvm-svn: 72002
2009-05-18 15:16:49 +00:00
Eli Friedman
a97f07f22d
Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
...
It doesn't matter for piped input, but it's annoying when typing at the
console.
llvm-svn: 71998
2009-05-18 08:44:04 +00:00
Daniel Dunbar
5d8165435d
Fix a compile warning.
...
llvm-svn: 71993
2009-05-18 03:44:24 +00:00
Lang Hames
4030d8122d
Prevented reg0 from being added to MBB live-in set, which was causing issues
...
for PostRAScheduler.
llvm-svn: 71991
2009-05-17 23:50:36 +00:00
Jakob Stoklund Olesen
1c3da3a94b
Rename MachineVerifier pass to avoid command line collision.
...
llvm-svn: 71987
2009-05-17 19:37:14 +00:00
Duncan Sands
c5161d4b83
Check that the gcc front-end is not doing inlining
...
when not doing unit-at-a-time.
llvm-svn: 71986
2009-05-17 19:37:02 +00:00
Anton Korobeynikov
6de08cd093
Mark rotl/rotr as expand. This generates pretty ugly code, but this is better than nothing.
...
llvm-svn: 71976
2009-05-17 10:16:28 +00:00
Anton Korobeynikov
6b5523aec2
Typo
...
llvm-svn: 71975
2009-05-17 10:15:22 +00:00
Bill Wendling
e9353d7d6f
Formatting. Some updating of data structures. More work needs to be done to update the examples.
...
llvm-svn: 71974
2009-05-17 05:52:39 +00:00
Owen Anderson
33c346b807
Significantly improve Atomic.h by pulling in code from libatomic_ops by HP. This is a little outdated, but reasonably complete.
...
llvm-svn: 71973
2009-05-17 04:57:54 +00:00
Owen Anderson
48371650b6
Remove the volatile marker from the cas_flag typedef, fixing some warnings.
...
It's now the client's resposibility to add it in when needed
llvm-svn: 71959
2009-05-16 21:08:25 +00:00
Jakob Stoklund Olesen
af917d8f85
Fix a missing def-flag on a Mips epilogue load.
...
llvm-svn: 71935
2009-05-16 07:26:06 +00:00
Jakob Stoklund Olesen
99abac8996
Remember to set def-flag on register loaded from stack slot in CellSPU.
...
llvm-svn: 71934
2009-05-16 07:25:44 +00:00
Jakob Stoklund Olesen
e61c7a3958
Verify that explicit definitions in the TargetInstrDesc are matched by
...
explicit register define operands.
llvm-svn: 71933
2009-05-16 07:25:20 +00:00
Jakob Stoklund Olesen
c482d14565
Allow redefinition of reserved registers.
...
llvm-svn: 71932
2009-05-16 07:24:54 +00:00
Owen Anderson
b5c37ff57b
Back out the thread-safe ManagedStatic for now. Too many people have too many problems with it for the moment.
...
llvm-svn: 71931
2009-05-16 07:20:52 +00:00
Duncan Sands
83d008614f
Put back a bit of expensive checking logic that
...
was overenthusiastically deleted in r70234.
llvm-svn: 71926
2009-05-16 04:14:29 +00:00
Duncan Sands
81e053a739
Make sure the CXXFLAGS setting is picked up by
...
the common Makefile. Not sure why this suddenly
started causing problems.
llvm-svn: 71925
2009-05-16 04:00:00 +00:00
Duncan Sands
bdbc98f3ef
Pacify gcc-4.3, which suggests explicit braces here
...
to avoid an ambiguous else.
llvm-svn: 71924
2009-05-16 03:28:54 +00:00
Jakob Stoklund Olesen
9d7fb58581
Help DejaGnu avoid pipe-jam by producing less output from certain test cases.
...
When a test fails with more than a pipeful of output on stdout AND stderr, one
of the DejaGnu programs blocks. The problem can be avoided by redirecting
stdout to a file.
llvm-svn: 71919
2009-05-16 00:34:42 +00:00
Jakob Stoklund Olesen
36c027ab18
Pass to verify generated machine code.
...
The following is checked:
* Operand counts: All explicit operands must be present.
* Register classes: All physical and virtual register operands must be
compatible with the register class required by the instruction descriptor.
* Register live intervals: Registers must be defined only once, and must be
defined before use.
The machine code verifier is enabled with the command-line option
'-verify-machineinstrs', or by defining the environment variable
LLVM_VERIFY_MACHINEINSTRS to the name of a file that will receive all the
verifier errors.
llvm-svn: 71918
2009-05-16 00:33:53 +00:00
Jay Foad
e609ab00a5
Work around the fact that GNU libstdc++'s debug mode uses RTTI.
...
llvm-svn: 71871
2009-05-15 18:13:31 +00:00
Anton Korobeynikov
dae2d9a852
Unbreak mingw build
...
llvm-svn: 71856
2009-05-15 11:04:52 +00:00
Owen Anderson
e61a56f6f3
Improve compatibility with older versions of Windows.
...
llvm-svn: 71855
2009-05-15 10:40:23 +00:00
Bill Wendling
2f921f82e4
Split out the DwarfDebug module from the DwarfWriter module.
...
Again, no intendtional functionality change.
llvm-svn: 71854
2009-05-15 09:23:25 +00:00
Owen Anderson
0e4b4929fc
Factor out some common code, fix more typoes, and add a memory fence that might be needed.
...
llvm-svn: 71853
2009-05-15 08:22:07 +00:00
Owen Anderson
2e38cb19a4
Fix an unfortunate typo.
...
llvm-svn: 71852
2009-05-15 08:07:23 +00:00
Bill Wendling
1c5fd604b3
Mark class as hidden.
...
llvm-svn: 71850
2009-05-15 06:55:26 +00:00
Owen Anderson
dc17f4fe62
(Hopefully) unbreak Apple-style builds.
...
llvm-svn: 71849
2009-05-15 06:49:31 +00:00
Evan Cheng
e23c109a67
Fix PR4210. Rewritter should track and update kills of sub-registers as well.
...
llvm-svn: 71848
2009-05-15 06:48:19 +00:00
Owen Anderson
c9cbd86cfa
Don't #include OSAtomic.h unless we really need it.
...
llvm-svn: 71837
2009-05-15 05:13:57 +00:00
Nick Lewycky
942982278c
Fix warning.
...
llvm-svn: 71834
2009-05-15 03:07:14 +00:00
Nick Lewycky
d449e7c8c6
Add extra parenthesis around || statements to pacify compiler.
...
Also fix up some 80col violations while I'm there.
llvm-svn: 71833
2009-05-15 03:03:14 +00:00
Bill Wendling
dd20b98c35
Move c'tor/d'tor to top of file.
...
llvm-svn: 71828
2009-05-15 01:18:50 +00:00
Bill Wendling
d64cd2bb6e
Split out the DwarfException class into its own file. No functionality change,
...
though the classes have been marked with "VISIBILITY_HIDDEN".
llvm-svn: 71827
2009-05-15 01:12:28 +00:00
Bill Wendling
47054f3d57
Split out the Dwarf writer stuff into separate files. This is a much more
...
logical/sane approach to organizing all of the stuff that goes into writing out
DWARF information. Honestly? even this is too complex for what it's supposed to
be doing.
Trivia: It *looks* like there would be functionality changes, however there aren't!
llvm-svn: 71821
2009-05-15 00:11:17 +00:00
Owen Anderson
509bb7423e
Now with working on Leopard!
...
llvm-svn: 71819
2009-05-15 00:01:40 +00:00
David Greene
3587eed2c4
Implement !if, analogous to $(if) in GNU make.
...
llvm-svn: 71815
2009-05-14 23:26:46 +00:00
Mike Stump
35ea2c9aa6
Reflow to fit 80-col.
...
llvm-svn: 71813
2009-05-14 23:23:37 +00:00
Mike Stump
13e4f10c53
Reflow to fit 80-col.
...
llvm-svn: 71812
2009-05-14 23:22:47 +00:00
David Greene
9bb2de17c2
Fix tests to not upset DejaGNU.
...
llvm-svn: 71811
2009-05-14 23:21:40 +00:00
David Greene
d571b3c94b
Graduate LLVM to the big leagues by embedding a LISP processor into TableGen.
...
Ok, not really, but do support some common LISP functions:
* car
* cdr
* null
llvm-svn: 71805
2009-05-14 22:38:31 +00:00
David Greene
e917fff30f
Implement a !foreach operator analogous to GNU make's $(foreach).
...
Use it on dags and lists like this:
class decls {
string name;
}
def Decls : decls;
class B<list<string> names> : A<!foreach(Decls.name, names, !strconcat(Decls.name, ", Sr."))>;
llvm-svn: 71803
2009-05-14 22:23:47 +00:00
David Greene
98ed3c7273
Implement a !subst operation simmilar to $(subst) in GNU make to do
...
def/var/string substitution on generic pattern templates. For example:
def Type;
def v4f32 : Type;
def TYPE : Type;
class GenType<Type t> {
let type = !(subst TYPE, v4f32, t);
}
def TheType : GenType<TYPE>;
llvm-svn: 71801
2009-05-14 21:54:42 +00:00
Owen Anderson
a379765d45
Dropped this #include by accident.
...
llvm-svn: 71798
2009-05-14 21:33:57 +00:00
Owen Anderson
5c46602d30
Make ManagedStatic threadsafe by using atomic operations.
...
llvm-svn: 71796
2009-05-14 21:26:50 +00:00
Owen Anderson
a6947e9436
Add CompareAndSwap.
...
llvm-svn: 71795
2009-05-14 21:24:15 +00:00
David Greene
e8f3b27e65
Implement !cast.
...
llvm-svn: 71794
2009-05-14 21:22:49 +00:00
David Greene
5d0c051e66
Operation Enhancements
...
Create an OpInit class to serve as a base for all operation Inits.
Move parsing of operation constructs to separate functions and reference
from multiple places.
Add some commented out new operations. Coming soon.
llvm-svn: 71789
2009-05-14 20:54:48 +00:00
David Greene
9d3febea6a
Fix PR4207.
...
If we're resolving a list element access and we're given a VarInit,
return a new VarListElementInit referencing the VarInit.
llvm-svn: 71787
2009-05-14 20:38:52 +00:00
Owen Anderson
672855eba8
Down with static variables!
...
Part one of many.
llvm-svn: 71785
2009-05-14 19:17:24 +00:00
Mike Stump
207fbf4320
Tag blocks with DW_AT_APPLE_block.
...
llvm-svn: 71784
2009-05-14 18:45:49 +00:00
Dale Johannesen
1ac1969e09
Reuse existing getUnderlyingObject instead of
...
adding another copy.
llvm-svn: 71783
2009-05-14 18:41:18 +00:00
Bill Wendling
6ddc11aedd
Non-functionality changes:
...
- Reformatting.
- Use while() instead of do-while().
- Move simple constructors into .h file.
llvm-svn: 71782
2009-05-14 18:26:15 +00:00
Bill Wendling
3fe4cf745b
Clean up this file fixing 80-column violations, bad formatting, etc. No functionality change.
...
llvm-svn: 71781
2009-05-14 18:16:46 +00:00
Bob Wilson
857fe4e425
Revert r71744. I must not have understood this correctly, because the
...
assertion is failing for some tests.
llvm-svn: 71779
2009-05-14 18:08:41 +00:00
Dale Johannesen
f241df9abe
Use abs64 in one more place.
...
llvm-svn: 71775
2009-05-14 16:47:34 +00:00
Jim Grosbach
1a18dcc34a
clean up line-wrapping
...
llvm-svn: 71771
2009-05-14 15:44:15 +00:00
Owen Anderson
d54eb23aa6
Add an Atomic.h to the System library, for providing a platform independent API
...
to low-level sync operations.
The only one present at the moment is MemoryFence(), and only for the platforms
for which I could easily discern the proper way to do it. If your favorite platform
isn't represented, patches are welcome!
llvm-svn: 71770
2009-05-14 05:54:36 +00:00
Lang Hames
2646b72424
Fix for PR4124. Make TwoAddressFormPass::FindLastUseInMBB return the real last use.
...
llvm-svn: 71769
2009-05-14 04:26:30 +00:00
Jim Grosbach
06928192ae
Update the names of the exception handling sjlj instrinsics to
...
llvm.eh.sjlj.* for better clarity as to their purpose and scope. Add
a description of llvm.eh.sjlj.setjmp to ExceptionHandling.html.
(llvm.eh.sjlj.longjmp documentation coming when that implementation is
added).
llvm-svn: 71758
2009-05-14 00:46:35 +00:00
Dan Gohman
d4f63052c4
Add an assert to turn a segfault on an unsupported inline
...
asm construct into an assertion failure.
llvm-svn: 71757
2009-05-14 00:30:16 +00:00
Mike Stump
0e78566e02
Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
...
Radar 6867696
llvm-svn: 71750
2009-05-14 00:03:51 +00:00
Bill Wendling
cdec744869
There's yet more ugliness (surprise!) in DebugInfo. This needs major reworking.
...
Basically, there was a situation where it was getting an empty vector and doing
a .back() on that. Which isn't cool.
llvm-svn: 71746
2009-05-13 23:55:49 +00:00
Bob Wilson
b4c93b1ff7
The IfConverter::MergeBlocks method appears to be used only to merge a basic
...
block with its unique predecessor. Change the code to assert if that is not
the case, instead of trying to handle situations where the block has
multiple predecessors.
llvm-svn: 71744
2009-05-13 23:54:13 +00:00
Jim Grosbach
4f915313ed
Removing the HasBuiltinSetjmp flag and associated bits. Flagging the presence
...
of exception handling builtin sjlj targets in functions turns out not to
be necessary. Marking the intrinsic implementation in the .td file as
defining all registers is sufficient to get the context saved properly by
the containing function.
llvm-svn: 71743
2009-05-13 23:50:53 +00:00
Bob Wilson
43f21dde1e
Revert a portion of Dan's change r71018 that I'm convinced is wrong.
...
Dan was trying to catch the case where a basic block ends with a conditional
branch to the fall-through block. In this case, all the instructions have
been moved out of FromBBI, leaving it empty. It cannot end with a
conditional branch. As the existing comment indicates, it will always fall
through to the next block. If the block already had the next block (NBB)
listed as a successor, the preceding loop has a check for that and does not
remove it. Thus, we need to check and add the successor only when it is
not already listed.
With Dan's change, the empty block often ends up with the fall-through
successor listed twice. This exposed the problem in pr4195, where
CodePlacementOpt did not handle the same predecessor listed more than once.
It is also at least partially responsible for pr4202 and probably a similar
issue with Thumb branches being out of range.
llvm-svn: 71742
2009-05-13 23:48:58 +00:00
Bob Wilson
969bf71ca6
Merge adjacent conditional.
...
llvm-svn: 71741
2009-05-13 23:35:38 +00:00
Bob Wilson
43467d7daf
Remove an unused variable.
...
llvm-svn: 71740
2009-05-13 23:31:30 +00:00
Bob Wilson
2371f4f70a
Fix some typos and spelling and grammar, mostly in comments, but also one
...
field name. No functional changes.
llvm-svn: 71739
2009-05-13 23:25:24 +00:00
Mike Stump
889285d467
Fix whitespacing (space after switch).
...
llvm-svn: 71738
2009-05-13 23:23:20 +00:00
Jim Grosbach
91fa781df3
Spelling correction s/builting/builtin/ and remove trailing whitespace in a few places
...
llvm-svn: 71735
2009-05-13 22:32:43 +00:00
Dan Gohman
6b43dd7664
Add nounwind to this test.
...
llvm-svn: 71734
2009-05-13 22:29:12 +00:00
Bill Wendling
7abc25ad68
Remove too large testcase.
...
llvm-svn: 71730
2009-05-13 21:51:26 +00:00
Evan Cheng
ab0d23396a
Run code placement optimization for targets that want it (arm and x86 for now).
...
llvm-svn: 71726
2009-05-13 21:42:09 +00:00
Evan Cheng
ca528538a9
Indentation.
...
llvm-svn: 71724
2009-05-13 21:39:20 +00:00
Bill Wendling
f7b83c7ae7
Change MachineInstrBuilder::addReg() to take a flag instead of a list of
...
booleans. This gives a better indication of what the "addReg()" is
doing. Remembering what all of those booleans mean isn't easy, especially if you
aren't spending all of your time in that code.
I took Jakob's suggestion and made it illegal to pass in "true" for the
flag. This should hopefully prevent any unintended misuse of this (by reverting
to the old way of using addReg()).
llvm-svn: 71722
2009-05-13 21:33:08 +00:00
Dale Johannesen
3181652363
Handle some additonal cases of external weak globals.
...
llvm-svn: 71717
2009-05-13 20:55:30 +00:00
Bill Wendling
1d601cdaf4
Move the bookkeeping of the debug scopes back to the place where it
...
belonged. The variable declaration stuff wasn't happy with it where it
was. Sorry that the testcase is so big. Bugpoint wasn't able to reduce it
successfully.
llvm-svn: 71714
2009-05-13 20:33:33 +00:00
Dale Johannesen
9e26d3708a
Testcase for 71688.
...
llvm-svn: 71691
2009-05-13 18:33:24 +00:00
Dale Johannesen
69921959b4
Don't generate a select whose operand is load of a weak
...
external. These may have address 0 and are not safe
to execute unconditionally.
llvm-svn: 71688
2009-05-13 18:25:07 +00:00
Chris Lattner
784ae669ab
garbage allocation is not a good idea :)
...
llvm-svn: 71680
2009-05-13 18:02:09 +00:00
John Mosby
ce06bb8a53
PEI: rename PEI.h to PrologEpilogInserter.h to adhere to file naming standard
...
llvm-svn: 71678
2009-05-13 17:52:11 +00:00
Chris Lattner
149546a6a0
calls in nothrow functions can be marked nothrow even if the callee
...
is not known to be nothrow. This allows readnone/readonly functions
to be deleted even if we don't know whether the callee can throw.
llvm-svn: 71676
2009-05-13 17:39:14 +00:00
Sanjiv Gupta
4a71ae268b
Run through the list of globals once and sectionize all types of globlas includeing declarations. Later emit them from their section lists.
...
llvm-svn: 71661
2009-05-13 15:13:17 +00:00
Duncan Sands
ef8c8ec457
Fix typo.
...
llvm-svn: 71656
2009-05-13 13:13:18 +00:00
Duncan Sands
7e3c9e1bd9
Avoid getting a compiler warning
...
IVUsers.cpp: In member function ‘bool llvm::IVUsers::AddUsersIfInteresting(llvm::Instruction*)’:
IVUsers.cpp:221: warning: ‘isSigned’ may be used uninitialized in this function
with gcc-4.3.
llvm-svn: 71654
2009-05-13 12:52:44 +00:00
Chris Lattner
fce7bc924e
add IVUsers.cpp
...
llvm-svn: 71646
2009-05-13 06:28:04 +00:00
Chris Lattner
1bc26286ef
add ShrinkWrapping.cpp
...
llvm-svn: 71645
2009-05-13 06:27:38 +00:00
Chris Lattner
7e335a763a
Fix PR4206 - crash in simplify lib calls
...
llvm-svn: 71644
2009-05-13 06:26:11 +00:00
Lang Hames
8d4636d516
Fix for PR4121. If TwoAddressInstructionPass removes a dead def, and the regB
...
operand was killed, the kill needs to be removed from regB's VarInfo.
llvm-svn: 71635
2009-05-13 04:18:47 +00:00
Dan Gohman
e712a2f663
Add three new helper routines, getNoopOrZeroExtend,
...
getNoopOrSignExtend, and getTruncateOrNoop. These are similar
to getTruncateOrZeroExtend etc., except that they assert that
the conversion is either not widening or narrowing, as
appropriate. These will be used in some upcoming fixes.
llvm-svn: 71632
2009-05-13 03:46:30 +00:00
Dale Johannesen
536de01bcf
Add an int64_t variant of abs, for host environments
...
without one. Use it where we were using abs on
int64_t objects.
(I strongly suspect the casts to unsigned in the
fragments in LoopStrengthReduce are not doing whatever
the original intent was, but the obvious change to
uint64_t doesn't work. Maybe later.)
llvm-svn: 71612
2009-05-13 00:24:22 +00:00
Jim Grosbach
aeca45dd6f
Add support for GCC compatible builtin setjmp and longjmp intrinsics. This is
...
a supporting preliminary patch for GCC-compatible SjLJ exception handling. Note that these intrinsics are not designed to be invoked directly by the user, but
rather used by the front-end as target hooks for exception handling.
llvm-svn: 71610
2009-05-12 23:59:14 +00:00
Evan Cheng
85cca64dd7
If header of inner loop is aligned, do not align the outer loop header. We don't want to add nops in the outer loop for the sake of aligning the inner loop.
...
llvm-svn: 71609
2009-05-12 23:58:14 +00:00
Evan Cheng
df1aeeeb90
Teach TransferDeadness to delete truly dead instructions if they do not produce side effects.
...
llvm-svn: 71606
2009-05-12 23:07:00 +00:00
Dale Johannesen
69ee5e4cfe
Slightly improve generated code in a degenerate case.
...
Should remove a warning from MSVC.
llvm-svn: 71603
2009-05-12 22:32:29 +00:00
Jim Grosbach
46632d89bb
correct register class for tADDspi to GPR since the register will always be SP
...
llvm-svn: 71602
2009-05-12 22:30:18 +00:00
Bill Wendling
6b167d684a
More MSVC fixes -- class/struct conflicts.
...
llvm-svn: 71601
2009-05-12 21:55:29 +00:00
Bill Wendling
96364f7816
Use struct instead of class to make MCVS compile.
...
llvm-svn: 71600
2009-05-12 21:50:43 +00:00
John Mosby
faec4fd030
Restructure PEI code:
...
- moved shrink wrapping code from PrologEpilogInserter.cpp to
new file ShrinkWrapping.cpp.
- moved PEI pass definition into new shared header PEI.h.
llvm-svn: 71588
2009-05-12 20:33:29 +00:00
Jay Foad
9a968a8b17
Switch to using IRBuilder throughout.
...
llvm-svn: 71587
2009-05-12 20:27:44 +00:00
Evan Cheng
b41de47856
80 col violations.
...
llvm-svn: 71582
2009-05-12 20:17:52 +00:00
Evan Cheng
79afe74195
Add nounwind.
...
llvm-svn: 71575
2009-05-12 18:35:43 +00:00
Evan Cheng
c94de92c54
Fixed a stack slot coloring with reg bug: do not update implicit use / def when doing forward / backward propagation.
...
llvm-svn: 71574
2009-05-12 18:31:57 +00:00
Bill Wendling
cb368e295d
Use llvm::raw_stream instead of llvm::Streams.
...
llvm-svn: 71573
2009-05-12 18:29:42 +00:00
Bob Wilson
ce8cfb41e8
Fix up a few minor typos in comments.
...
llvm-svn: 71563
2009-05-12 17:35:29 +00:00
Bob Wilson
2f4e56fd2e
Fix 80-col violations and remove trailing whitespace. No functional changes.
...
llvm-svn: 71562
2009-05-12 17:09:30 +00:00
Dan Gohman
45b46687f4
Clarify a comment.
...
llvm-svn: 71561
2009-05-12 17:08:34 +00:00
Sanjiv Gupta
83adfb4a9f
Iterate over globals once and sectionize them into appropriate sections.
...
Later in asmprinter, go over thsese sections and print them.
Do not print empty sections.
llvm-svn: 71560
2009-05-12 17:07:27 +00:00
Daniel Dunbar
310511d429
Allow client Makefiles control over whether they want -pedantic by
...
defining NO_PEDANTIC.
- Pedantic C89 is a painful language...
llvm-svn: 71545
2009-05-12 07:26:49 +00:00
Sanjiv Gupta
679e578c65
We do not need to create a label for external defs and decls,
...
just emit a comment for readability.
llvm-svn: 71544
2009-05-12 06:52:41 +00:00
Daniel Dunbar
8a28e011f4
Refactor dependency generation for .ll files.
...
- This matches the normal dependency generation code.
- This also fixes the problem that when building a normal and bitcode
archive from the same source, the dependency files would overwrite
one another. Which was bad.
llvm-svn: 71542
2009-05-12 06:35:50 +00:00
Daniel Dunbar
583c5dcd76
Remove obsolete Makefile magic for calling llvm-upgrade
...
llvm-svn: 71540
2009-05-12 05:49:22 +00:00
Daniel Dunbar
c25ba426bd
Install bytecode libraries with a .bca suffix, otherwise it isn't
...
possible to build both a .a and a .bca.
- My understanding is no one else is using this stuff, please let me
know if I am wrong.
llvm-svn: 71539
2009-05-12 05:35:40 +00:00
Sanjiv Gupta
63f5f68024
Mark mayLoad, mayStore for insns correctly and use them
...
to check if an insn is accessing memory during mem sel optimization.
llvm-svn: 71537
2009-05-12 04:30:38 +00:00
Bob Wilson
9e3d48f10d
Fix pr4195: When iterating through predecessor blocks, break out of the loop
...
after finding the (unique) layout predecessor. Sometimes a block may be listed
more than once, and processing it more than once in this loop can lead to
inconsistent values for FtTBB/FtFBB, since the AnalyzeBranch method does not
clear these values. There's no point in continuing the loop regardless.
The testcase for this is reduced from the 2003-05-02-DependentPHI SingleSource
test.
llvm-svn: 71536
2009-05-12 03:48:10 +00:00
Dan Gohman
d76d71a291
Factor the code for collecting IV users out of LSR into an IVUsers class,
...
and generalize it so that it can be used by IndVarSimplify. Implement the
base IndVarSimplify transformation code using IVUsers. This removes
TestOrigIVForWrap and associated code, as ScalarEvolution now has enough
builtin overflow detection and folding logic to handle all the same cases,
and more. Run "opt -iv-users -analyze -disable-output" on your favorite
loop for an example of what IVUsers does.
This lets IndVarSimplify eliminate IV casts and compute trip counts in
more cases. Also, this happens to finally fix the remaining testcases
in PR1301.
Now that IndVarSimplify is being more aggressive, it occasionally runs
into the problem where ScalarEvolutionExpander's code for avoiding
duplicate expansions makes it difficult to ensure that all expanded
instructions dominate all the instructions that will use them. As a
temporary measure, IndVarSimplify now uses a FixUsesBeforeDefs function
to fix up instructions inserted by SCEVExpander. Fortunately, this code
is contained, and can be easily removed once a more comprehensive
solution is available.
llvm-svn: 71535
2009-05-12 02:17:14 +00:00
Dan Gohman
ae451600fa
When forgetting SCEVs for loop PHIs, don't forget SCEVUnknown values.
...
These values aren't analyzable, so they don't care if more information
about the loop trip count can be had. Also, SCEVUnknown is used for
a PHI while the PHI itself is being analyzed, so it needs to be left
in the Scalars map. This fixes a variety of subtle issues.
llvm-svn: 71533
2009-05-12 01:27:58 +00:00
Dan Gohman
d6c04461a4
Fix GetMinTrailingZeros for SCEVSignExtend and SCEVZeroExtendExpr to
...
return the correct value when the cast operand is all zeros. This ought
to be pretty rare, because it would mean that the regular SCEV folding
routines missed a case, though there are cases they might legitimately
miss. Also, it's unlikely anything currently using GetMinTrailingZeros
cares about this case.
llvm-svn: 71532
2009-05-12 01:23:18 +00:00
Evan Cheng
55173b7646
Avoid unneeded SIB byte encoding. Patch by Zoltan Varga.
...
llvm-svn: 71520
2009-05-12 00:07:35 +00:00
Bill Wendling
6c60dbb3cb
- Record that the debug info is actually used so that the label folder doesn't
...
blast it away.
- Move InlineInfo bookkeeping to bookkeep the correct debug info object.
llvm-svn: 71519
2009-05-12 00:06:59 +00:00
Lang Hames
f094cbbcb9
Fixed PR4090.
...
llvm-svn: 71495
2009-05-11 23:14:13 +00:00
Evan Cheng
78a4eb844b
Teach LSR to optimize more loop exit compares, i.e. change them to use postinc iv value. Previously LSR would only optimize those which are in the loop latch block. However, if LSR can prove it is safe (and profitable), it's now possible to change those not in the latch blocks to use postinc values.
...
Also, if the compare is the only use, LSR would place the iv increment instruction before the compare instead in the latch.
llvm-svn: 71485
2009-05-11 22:33:01 +00:00
Mike Stump
b517f2c5e2
Add DW_AT_APPLE_isa and DW_AT_APPLE_block. Radar 6867696
...
llvm-svn: 71479
2009-05-11 21:58:01 +00:00
Dale Johannesen
b571463363
Fix PR4188. TailMerging can't tolerate inexact
...
sucessor info.
llvm-svn: 71478
2009-05-11 21:54:13 +00:00
Evan Cheng
1988352fbd
Apply patch review feedback.
...
llvm-svn: 71472
2009-05-11 20:53:52 +00:00
Jay Foad
ec63c85505
Don't #include DerivedTypes.h from TargetData.h.
...
llvm-svn: 71468
2009-05-11 19:38:09 +00:00
Dan Gohman
81c3bf606d
Add a comment about the special meaning of VoidTy in this context.
...
llvm-svn: 71466
2009-05-11 19:11:53 +00:00
Dan Gohman
1dbb40f481
Fix two wording errors that Duncan spotted.
...
llvm-svn: 71459
2009-05-11 18:51:16 +00:00
Dan Gohman
5b3a56bfac
Make this grep line a little more specific so that it doesn't
...
accidentally match something unrelated.
llvm-svn: 71458
2009-05-11 18:49:56 +00:00
Evan Cheng
2b1b92189d
Unbreak non-debug build.
...
llvm-svn: 71457
2009-05-11 18:40:52 +00:00