Bill Wendling
5191934371
We need to propagate the debug location information even when dealing with the
...
prologue/epilogue.
llvm-svn: 65206
2009-02-21 00:32:08 +00:00
Dan Gohman
e7fe80fcf9
Fix a bug that David Greene found in the DAGCombiner's logic
...
that checks whether it's safe to transform a store of a bitcast
value into a store of the original value.
llvm-svn: 65201
2009-02-20 23:29:13 +00:00
Evan Cheng
8a9481d50d
Fix strange logic in CollectIVUsers used to determine whether all uses are
...
addresses, part 1. This fixes an obvious logic bug. Previously if the only
in-loop use is a PHI, it would return AllUsesAreAddresses as true.
llvm-svn: 65178
2009-02-20 22:16:49 +00:00
Dan Gohman
5e309a5bbb
Simplify code and reduce indentation. No functionality change.
...
llvm-svn: 65167
2009-02-20 21:27:23 +00:00
Dan Gohman
2c8cb5b4ec
Fix 80-column violations.
...
llvm-svn: 65159
2009-02-20 21:06:57 +00:00
Dan Gohman
addc50b4ee
It's not necessary to check if Base is null here.
...
llvm-svn: 65157
2009-02-20 21:05:23 +00:00
Evan Cheng
2a9bad5ac1
Support return of MMX values in 64-bit mode.
...
llvm-svn: 65152
2009-02-20 20:43:02 +00:00
Bill Wendling
2343339644
- Early exit a nested block.
...
- Correct comment.
- Whitespace changes.
llvm-svn: 65149
2009-02-20 20:40:28 +00:00
Dan Gohman
1608df5319
Add a comment about how Imm can be used for loop-variant values.
...
llvm-svn: 65147
2009-02-20 20:29:04 +00:00
Torok Edwin
87d5ca083b
add note about sin
...
llvm-svn: 65137
2009-02-20 18:42:06 +00:00
Evan Cheng
c380864d2c
Factor address mode matcher out of codegen prepare to make it available to other passes, e.g. loop strength reduction.
...
llvm-svn: 65134
2009-02-20 18:24:38 +00:00
Zhou Sheng
053737e1ae
Just roll back the previous change to -mem2reg.
...
Will re-think about this according to Chris's comments.
llvm-svn: 65126
2009-02-20 17:49:33 +00:00
Zhou Sheng
6a0634d423
patch to update the line number information in pass -mem2reg.
...
Currently this pass will delete the variable declaration info,
and keep the line number info. But the kept line number info is not updated,
and some is redundant or not correct, this patch just updates those info.
llvm-svn: 65123
2009-02-20 16:31:35 +00:00
Owen Anderson
f13820148b
Fix a crash in the pre-alloc splitter exposed by recent codegen changes.
...
llvm-svn: 65121
2009-02-20 10:02:23 +00:00
Owen Anderson
81db491b7f
Add a quick pass to the stack slot colorer to eliminate some trivially redundant spills after coloring.
...
Ideally these would never get created in the first place, but until we enhance the spiller to have a more
global picture of what's happening, this is necessary for code quality in some circumstances.
llvm-svn: 65120
2009-02-20 09:11:36 +00:00
Dan Gohman
2a12ae7d1f
Implement "superhero" strength reduction, or full strength
...
reduction of address calculations down to basic pointer arithmetic.
This is currently off by default, as it needs a few other features
before it becomes generally useful. And even when enabled, full
strength reduction is only performed when it doesn't increase
register pressure, and when several other conditions are true.
This also factors out a bunch of exisiting LSR code out of
StrengthReduceStridedIVUsers into separate functions, and tidies
up IV insertion. This actually decreases register pressure even
in non-superhero mode. The change in iv-users-in-other-loops.ll
is an example of this; there are two more adds because there are
two fewer leas, and there is less spilling.
llvm-svn: 65108
2009-02-20 04:17:46 +00:00
Bill Wendling
0a0987d198
Add an accessor method to DwarfWriter to tell of debugging info should be emitted.
...
llvm-svn: 65092
2009-02-20 00:44:43 +00:00
Bill Wendling
7b9f38ad37
Temporarily revert r65065. It was causing test failures.
...
llvm-svn: 65068
2009-02-19 21:57:07 +00:00
Bill Wendling
1a0a3d0ff5
Print out debug info when printing the machine instruction.
...
llvm-svn: 65067
2009-02-19 21:44:55 +00:00
Bill Wendling
df78dcc0b2
Check for -fast here too.
...
llvm-svn: 65065
2009-02-19 21:23:54 +00:00
Bill Wendling
19e0a5b3c3
Generate these labels when we're in "fast" mode, not simply when we're no in
...
"optimize-for-size" mode.
llvm-svn: 65064
2009-02-19 21:12:54 +00:00
Dan Gohman
a34d7adefb
Use DEBUG() instead of passing *DOUT to WriteAsOperand,
...
since the latter just passes a null reference when
debugging is not enabled.
llvm-svn: 65060
2009-02-19 19:32:06 +00:00
Dan Gohman
30a2959367
Make the debug output of LSR less cryptic and more informative.
...
llvm-svn: 65057
2009-02-19 19:23:27 +00:00
Chris Lattner
3c50fdf4ca
If an executable is run through a symlink, dladdr will return the
...
symlink. We really want the ultimate executable being run, not
the symlink. This lets clang find its headers when invoked through
a symlink. rdar://6602012
llvm-svn: 65017
2009-02-19 05:34:35 +00:00
Dan Gohman
c0ae249b22
Fix the logic in this assertion to properly validate the number
...
of arguments.
llvm-svn: 64999
2009-02-19 02:55:18 +00:00
Dan Gohman
6c109b4979
Reapply r57340. VMKit does not presently rely on materializeFunction
...
being called with the lock released, and this fixes a race condition
in the JIT as used by lli.
llvm-svn: 64997
2009-02-19 02:40:15 +00:00
Bill Wendling
0f4c581c4a
Put code that generates debug labels into TableGen so that it can be used by
...
everyone.
llvm-svn: 64978
2009-02-18 23:12:06 +00:00
Chris Lattner
778c62ccb5
add proper asmwriter and asmparser support for anonymous functions.
...
llvm-svn: 64953
2009-02-18 21:48:13 +00:00
Duncan Sands
7a1db33e77
In theory the aliasee may have dead constant users
...
here. Since we only do the transform if there is
one use, strip off any such users in the hope of
making the transform fire more often.
llvm-svn: 64926
2009-02-18 17:55:38 +00:00
Devang Patel
66c5a1dd50
The subprogram die may not exist while creating "default" scope.
...
llvm-svn: 64920
2009-02-18 17:29:38 +00:00
Dan Gohman
8078b8bddc
Use a sign-extend instead of a zero-extend when promoting a
...
trip count value when the original loop iteration condition is
signed and the canonical induction variable won't undergo signed
overflow. This isn't required for correctness; it just preserves
more information about original loop iteration values.
Add a getTruncateOrSignExtend method to ScalarEvolution,
following getTruncateOrZeroExtend.
llvm-svn: 64918
2009-02-18 17:22:41 +00:00
Dan Gohman
aa0f01929b
Simplify by using dyn_cast instead of isa and cast.
...
llvm-svn: 64917
2009-02-18 16:54:33 +00:00
Dan Gohman
8cab4c44bb
Add explicit keywords.
...
llvm-svn: 64915
2009-02-18 16:37:45 +00:00
Nate Begeman
18d85e7403
Add support to the JIT for true non-lazy operation. When a call to a function
...
that has not been JIT'd yet, the callee is put on a list of pending functions
to JIT. The call is directed through a stub, which is updated with the address
of the function after it has been JIT'd. A new interface for allocating and
updating empty stubs is provided.
Add support for removing the ModuleProvider the JIT was created with, which
would otherwise invalidate the JIT's PassManager, which is initialized with the
ModuleProvider's Module.
Add support under a new ExecutionEngine flag for emitting the infomration
necessary to update Function and GlobalVariable stubs after JITing them, by
recording the address of the stub and the name of the GlobalValue. This allows
code to be copied from one address space to another, where libraries may live
at different virtual addresses, and have the stubs updated with their new
correct target addresses.
llvm-svn: 64906
2009-02-18 08:31:02 +00:00
Dan Gohman
2af1f85f1f
Factor out the code to add a MachineOperand to a MachineInstrBuilder.
...
llvm-svn: 64891
2009-02-18 05:45:50 +00:00
Dan Gohman
38a9631d5f
Eliminate several more unnecessary intptr_t casts.
...
llvm-svn: 64888
2009-02-18 05:09:16 +00:00
Evan Cheng
a40d5e14ab
GV with null value initializer shouldn't go to BSS if it's meant for a mergeable strings section. Currently it only checks for Darwin. Someone else please check if it should apply to other targets as well.
...
llvm-svn: 64877
2009-02-18 02:19:52 +00:00
Dan Gohman
8212ebb5cf
Fix a corner case in the new indvars promotion logic: if there
...
are multiple IV's in a loop, some of them may under go signed
or unsigned wrapping even if the IV that's used in the loop
exit condition doesn't. Restrict sign-extension-elimination
and zero-extension-elimination to only those that operate on
the original loop-controlling IV.
llvm-svn: 64866
2009-02-18 00:52:00 +00:00
Dan Gohman
d0b1fbd983
Fix a typo in a comment.
...
llvm-svn: 64859
2009-02-18 00:08:39 +00:00
Duncan Sands
bf3ba5a1e9
If an alias is dead and so is its aliasee, then globaldce would
...
crash because the alias would still be using the aliasee when the
aliasee was deleted.
llvm-svn: 64844
2009-02-17 23:05:26 +00:00
Devang Patel
4d20395a5f
The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
...
Add support for two additional DWARF attributes to encode Objective-C runtime version number.
llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Scott Michel
cf0da6c597
Remove trailing whitespace to reduce later commit patch noise.
...
(Note: Eventually, commits like this will be handled via a pre-commit hook that
does this automagically, as well as expand tabs to spaces and look for 80-col
violations.)
llvm-svn: 64827
2009-02-17 22:15:04 +00:00
Devang Patel
528987a1e8
Emit debug info for bitfields.
...
llvm-svn: 64815
2009-02-17 21:23:59 +00:00
Dan Gohman
d90415555e
LoopIndexSplit doesn't actually use ScalarEvolution.
...
llvm-svn: 64811
2009-02-17 20:50:11 +00:00
Dan Gohman
4330034160
Add a method to ScalarEvolution for telling it when a loop has been
...
modified in a way that may effect the trip count calculation. Change
IndVars to use this method when it rewrites pointer or floating-point
induction variables instead of using a doInitialization method to
sneak these changes in before ScalarEvolution has a chance to see
the loop. This eliminates the need for LoopPass to depend on
ScalarEvolution.
llvm-svn: 64810
2009-02-17 20:49:49 +00:00
Chris Lattner
24f31a0e59
commit a tweaked version of Daniel's patch for PR3599. We now
...
eliminate all the extensions and all but the one required truncate
from the testcase, but the or/and/shift stuff still isn't zapped.
llvm-svn: 64809
2009-02-17 20:47:23 +00:00
Dan Gohman
143206d07b
Move dumpPassStructure out of line.
...
llvm-svn: 64796
2009-02-17 19:41:26 +00:00
Dan Gohman
f84d42f282
Delete trailing whitespace.
...
llvm-svn: 64784
2009-02-17 19:13:57 +00:00
Duncan Sands
f974c5703c
This transform also applies to private linkage.
...
llvm-svn: 64773
2009-02-17 17:50:04 +00:00
Dan Gohman
efe65e547b
Fix 80-column violation.
...
llvm-svn: 64766
2009-02-17 15:57:39 +00:00
Evan Cheng
f505cd5ebb
A couple of places where reused use operands should be marked kill. This is exposed by recent availability fallthrough changes.
...
llvm-svn: 64745
2009-02-17 06:41:03 +00:00
Chris Lattner
cba4b6f83d
add a horrible note
...
llvm-svn: 64719
2009-02-17 01:16:14 +00:00
Bill Wendling
3c50922ea0
--- Merging (from foreign repository) r64714 into '.':
...
U include/llvm/CodeGen/DebugLoc.h
U lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
U lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp
U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp
Enable debug location generation at -Os. This goes with the reapplication of the
r63639 patch.
llvm-svn: 64715
2009-02-17 01:04:54 +00:00
Evan Cheng
161861deb0
Strengthen the "non-constant stride must dominate loop preheader" check.
...
llvm-svn: 64703
2009-02-17 00:13:06 +00:00
Dan Gohman
2cd8982002
Simplify; fix some 80-column violations.
...
llvm-svn: 64702
2009-02-17 00:10:53 +00:00
Dan Gohman
2a4553ba5f
Delete trailing whitespace.
...
llvm-svn: 64694
2009-02-16 23:14:14 +00:00
Dan Gohman
f68d29edd5
Fix EnforceKnownAlignment so that it doesn't ever reduce the alignment
...
of an alloca or global variable.
llvm-svn: 64693
2009-02-16 23:02:21 +00:00
Nick Lewycky
0f269cfdee
Fix typo caused by too much surfing, dudes...
...
llvm-svn: 64626
2009-02-16 04:26:53 +00:00
Dan Gohman
136aa1fb96
Delete this long-commented-out code. The situation it seems to have
...
been written for is no longer relevant with the elimination of
signed and unsigned types.
llvm-svn: 64625
2009-02-16 02:57:42 +00:00
Dan Gohman
9cdfd44521
Change these tests to use regular loads instead of llvm.x86.sse2.loadu.dq.
...
Enhance instcombine to use the preferred field of
GetOrEnforceKnownAlignment in more cases, so that regular IR operations are
optimized in the same way that the intrinsics currently are.
llvm-svn: 64623
2009-02-16 00:44:23 +00:00
Dan Gohman
aaee6c9523
Don't assume that a left-shift of a value with one bit set will have
...
one bit set, because the bit may be shifted off the end. Instead,
just check for a constant 1 being shifted. This is still sufficient
to handle all the cases in test/CodeGen/X86/bt.ll. This fixes PR3583.
llvm-svn: 64622
2009-02-15 23:59:32 +00:00
Dan Gohman
f6ccacba36
MachineLICM now handles these cases.
...
llvm-svn: 64620
2009-02-15 23:24:52 +00:00
Nick Lewycky
8f4a097f15
Update the list of function annotations for nocapture. All of these came up
...
when I was looking at functions used by python.
Highlights include, better largefile support (64-bit file sizes on 32-bit
systems), fputs string is nocapture, popen/pclose added (popen being noalias
return), modf and frexp and friends. Also added some missing 'break' statements
and combined identical sections.
llvm-svn: 64615
2009-02-15 22:47:25 +00:00
Nicolas Geoffray
7f543ba9fa
On 64bit we may have a personality function which requires 64 bits to
...
be encoded.
llvm-svn: 64600
2009-02-15 20:49:23 +00:00
Duncan Sands
46196aef82
Make this more useful for cleaning up after the
...
one-definition-rule llvm-gcc changes (coming soon
to a tree near you!).
llvm-svn: 64588
2009-02-15 11:54:49 +00:00
Duncan Sands
b3f27881a9
If the target of an alias has internal linkage, then the
...
alias can be morphed into the target. Implement this
transform, and fix a crash in the existing transform at
the same time.
llvm-svn: 64583
2009-02-15 09:56:08 +00:00
Evan Cheng
2510436e20
Fix PR3522. It's not safe to sink into landing pad BB's.
...
llvm-svn: 64582
2009-02-15 08:36:12 +00:00
Evan Cheng
e79841adbb
Fix pr3571: If stride is a value defined by an instruction, make sure it dominates the loop preheader. When IV users are strength reduced, the stride is inserted into the preheader. It could create a use before def situation.
...
llvm-svn: 64579
2009-02-15 06:06:15 +00:00
Evan Cheng
fe151ba135
ifdef out unneeded if statement.
...
llvm-svn: 64575
2009-02-15 03:20:37 +00:00
Mikhail Glushenkov
58a1a8e546
Fix warning on gcc 4.3.
...
"system() declared with attribute warn_unused_result."
llvm-svn: 64574
2009-02-15 03:20:32 +00:00
Mikhail Glushenkov
a539836b95
Whitespace fixes.
...
llvm-svn: 64573
2009-02-15 03:20:03 +00:00
Cedric Venet
d1e179d992
Unbreak the build on win32.
...
Cleanup some warning.
Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.
Only tested with VS2008. hope it does not break anything. feel free to revert.
llvm-svn: 64554
2009-02-14 16:06:42 +00:00
Duncan Sands
73247d2edc
Generalize some alias analysis logic from atomic
...
intrinsics to any IntrWriteArgMem intrinsics.
llvm-svn: 64551
2009-02-14 10:56:35 +00:00
Dan Gohman
29705333e5
The x86-64 red zone is now being used.
...
llvm-svn: 64535
2009-02-14 03:30:05 +00:00
Dan Gohman
671f2c085f
Extend the IndVarSimplify support for promoting induction variables:
...
- Test for signed and unsigned wrapping conditions, instead of just
testing for non-negative induction ranges.
- Handle loops with GT comparisons, in addition to LT comparisons.
- Support more cases of induction variables that don't start at 0.
llvm-svn: 64532
2009-02-14 02:31:09 +00:00
Dan Gohman
47ff6aad23
Clarify debug output.
...
llvm-svn: 64531
2009-02-14 02:26:50 +00:00
Dan Gohman
4bfa1d4c63
Simplify some code. hasComputableLoopEvolution is overkill in this case.
...
No functionality change.
llvm-svn: 64530
2009-02-14 02:25:19 +00:00
Evan Cheng
c2fde91703
Teach x86 target -soft-float.
...
llvm-svn: 64496
2009-02-13 22:36:38 +00:00
Dan Gohman
55ea72179c
In CodeGenPrepare's debug output, use WriteAsOperand instead of
...
printing getName(), so that unnamed values are printed correctly.
llvm-svn: 64468
2009-02-13 17:45:12 +00:00
Dan Gohman
a2730abaaa
Complete the sentance in this comment. I have reservations
...
about the code it describes, but at least now the comment
is right.
llvm-svn: 64465
2009-02-13 17:36:42 +00:00
Duncan Sands
566ed10244
If a function only reads memory, then we know that...
...
it only reads memory! The other change has no
functional effect, it just seems more logical to
go in order of decreasing knowledge.
llvm-svn: 64463
2009-02-13 17:32:26 +00:00
Nick Lewycky
d234a845f9
Mark strto* as readonly when the endptr is null.
...
llvm-svn: 64460
2009-02-13 17:08:33 +00:00
Nick Lewycky
a0e83a0952
On strtod and friends, mark 'endptr' nocapture in the function prototype, and
...
mark the first argument nocapture if endptr=NULL for each particular call.
llvm-svn: 64453
2009-02-13 15:31:46 +00:00
Duncan Sands
51495609df
Reapply r64301. These uses of "inline" can cause strange
...
link-time failures when building with optimization. Just
get rid of them.
llvm-svn: 64449
2009-02-13 09:42:34 +00:00
Evan Cheng
cf4bd2319c
Switch from new[] + delete[] to malloc + free since llvm does not catch C++ exceptions.
...
llvm-svn: 64448
2009-02-13 08:24:55 +00:00
Evan Cheng
333db7abbd
If new[] fails, return 0 rather then trying to dereference a null pointer.
...
llvm-svn: 64444
2009-02-13 07:54:34 +00:00
Nick Lewycky
cdccffe731
Reapply r64300:
...
Make sure the SCC pass manager initializes any contained
function pass managers. Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.
llvm-svn: 64443
2009-02-13 07:15:53 +00:00
Nick Lewycky
c60bd012bc
BasicAA was making the assumption that a local allocation which hadn't escaped
...
couldn't ever be the return of call instruction. However, it's quite possible
that said local allocation is itself the return of a function call. That's
what malloc and calloc are for, actually.
llvm-svn: 64442
2009-02-13 07:06:27 +00:00
Dan Gohman
f71a473720
Fix the code that checked if a SCEVAddRecExpr Start contains an
...
addrec in a different loop to check the value being added to
the accumulated Start value, not the Start value before it has
the new value added to it. This prevents LSR from going crazy
on the included testcase. Dale, please review.
llvm-svn: 64440
2009-02-13 03:58:31 +00:00
Dale Johannesen
3a8bd17fdb
Remove non-DebugLoc versions of BuildMI from IA64, Mips.
...
llvm-svn: 64438
2009-02-13 02:34:39 +00:00
Dale Johannesen
9bba902c83
Remove non-DebugLoc versions of BuildMI from X86.
...
There were some that might even matter in X86FastISel.
llvm-svn: 64437
2009-02-13 02:33:27 +00:00
Dale Johannesen
57097d2a26
missed file
...
llvm-svn: 64436
2009-02-13 02:32:04 +00:00
Dale Johannesen
215a925766
Remove non-DebugLoc versions of buildMI from Sparc.
...
llvm-svn: 64435
2009-02-13 02:31:35 +00:00
Dale Johannesen
635f2a69d9
Remove non-DebugLoc versions of BuildMI from Alpha and Cell.
...
llvm-svn: 64433
2009-02-13 02:30:42 +00:00
Dale Johannesen
460bfeba8c
Remove refs to non-DebugLoc version of BuildMI from XCore, PIC16.
...
llvm-svn: 64432
2009-02-13 02:29:03 +00:00
Dale Johannesen
e9f623e27c
Remove refs to non-DebugLoc version of BuildMI from PowerPC.
...
llvm-svn: 64431
2009-02-13 02:27:39 +00:00
Dale Johannesen
b851a7853a
and one more file
...
llvm-svn: 64430
2009-02-13 02:26:21 +00:00
Dale Johannesen
7647da67ea
Remove refs to non-DebugLoc versions of BuildMI from ARM.
...
llvm-svn: 64429
2009-02-13 02:25:56 +00:00
Bill Wendling
65c0fd4c44
Revert this. It was breaking stuff.
...
llvm-svn: 64428
2009-02-13 02:16:35 +00:00
Bill Wendling
1c21ac3066
Turn off the old way of handling debug information in the code generator. Use
...
the new way, where all of the information is passed on SDNodes and machine
instructions.
llvm-svn: 64427
2009-02-13 02:01:04 +00:00
Dan Gohman
ba83228cdb
Fix LSR's IV sorting function to explicitly sort by bitwidth
...
after sorting by stride value. This prevents it from missing
IV reuse opportunities in a host-sensitive manner.
llvm-svn: 64415
2009-02-13 00:26:43 +00:00
Dale Johannesen
baca6ed65e
Check in missing file.
...
llvm-svn: 64410
2009-02-12 23:24:44 +00:00
Dale Johannesen
6b8c76a910
Eliminate a couple of non-DebugLoc BuildMI variants.
...
Modify callers.
llvm-svn: 64409
2009-02-12 23:08:38 +00:00
Dan Gohman
eb6be650ce
Teach IndVarSimplify to optimize code using the C "int" type for
...
loop induction on LP64 targets. When the induction variable is
used in addressing, IndVars now is usually able to inserst a
64-bit induction variable and eliminates the sign-extending cast.
This is also useful for code using C "short" types for
induction variables on targets with 32-bit addressing.
Inserting a wider induction variable is easy; the tricky part is
determining when trunc(sext(i)) expressions are no-ops. This
requires range analysis of the loop trip count. A common case is
when the original loop iteration starts at 0 and exits when the
induction variable is signed-less-than a fixed value; this case
is now handled.
This replaces IndVarSimplify's OptimizeCanonicalIVType. It was
doing the same optimization, but it was limited to loops with
constant trip counts, because it was running after the loop
rewrite, and the information about the original induction
variable is lost by that point.
Rename ScalarEvolution's executesAtLeastOnce to
isLoopGuardedByCond, generalize it to be able to test for
ICMP_NE conditions, and move it to be a public function so that
IndVars can use it.
llvm-svn: 64407
2009-02-12 22:19:27 +00:00
Nate Begeman
94aa38d568
Add suppport for ConstantExprs of shufflevectors whose result type is not equal to the
...
type of the vectors being shuffled.
llvm-svn: 64401
2009-02-12 21:28:33 +00:00
Dale Johannesen
655775293f
Arrange to print constants that match "n" and "i" constraints
...
in inline asm as signed (what gcc does). Add partial support
for x86-specific "e" and "Z" constraints, with appropriate
signedness for printing.
llvm-svn: 64400
2009-02-12 20:58:09 +00:00
Dan Gohman
656b097b8a
Add a utility function to LoopInfo to return the exit block
...
when the loop has exactly one exit, and make use of it in
LoopIndexSplit.
llvm-svn: 64388
2009-02-12 18:08:24 +00:00
Chris Lattner
844deb73f4
fix PR3538 for ARM.
...
llvm-svn: 64384
2009-02-12 17:38:23 +00:00
Chris Lattner
4d4c702d5f
fix PR3538 for PPC
...
llvm-svn: 64383
2009-02-12 17:37:15 +00:00
Chris Lattner
aed3a4215b
fix the X86 backend to just drop llvm.declare nodes for VLAs instead of
...
leaving them in the DAG and then getting selection errors. This is a
fix for PR3538.
llvm-svn: 64382
2009-02-12 17:33:11 +00:00
Dan Gohman
e366c29fa0
Adjust the sizes for a few SmallVectors to reflect their usage.
...
llvm-svn: 64381
2009-02-12 17:29:01 +00:00
Chris Lattner
90880e2598
make fast isel fall back to selectiondags for VLA llvm.declare intrinsics.
...
llvm-svn: 64379
2009-02-12 17:23:20 +00:00
Dan Gohman
e0d32c490a
This code doesn't actually use the ExitingBlocks list.
...
llvm-svn: 64376
2009-02-12 16:36:26 +00:00
Evan Cheng
cf5cd6ecfe
It's (currently) not safe to keep certain physical registers live across basic blocks, e.g. x86 fp stack registers.
...
llvm-svn: 64374
2009-02-12 10:32:17 +00:00
Evan Cheng
b570499c25
Oops. Last second clean up messed things up.
...
llvm-svn: 64373
2009-02-12 09:52:13 +00:00
Evan Cheng
8b39b545a9
If availability info is kept when fallthrough into a bb, add the available registers to live-in set.
...
llvm-svn: 64372
2009-02-12 09:43:23 +00:00
Evan Cheng
3a14efacb6
Replace one of burr scheduling heuristic with something more sensible. Now calcMaxScratches simply compute the number of true data dependencies. This actually improve a couple of tests in dejagnu suite as many tests in llvm nightly test suite.
...
llvm-svn: 64369
2009-02-12 08:59:45 +00:00
Julien Lerouge
7682ffdeb9
Fix MingW build, patch by Kenneth Boyd!
...
llvm-svn: 64366
2009-02-12 07:39:10 +00:00
Chris Lattner
feb129e813
Fix a nasty bug (PR3550) where the inline pass could incorrectly mark
...
calls with the tail marker when inlining them through an invoke. Patch,
testcase, and perfect analysis by Jay Foad!
llvm-svn: 64364
2009-02-12 07:06:42 +00:00
Chris Lattner
096f44de61
improve naming of values in GVN, patch by Jay Foad!
...
llvm-svn: 64363
2009-02-12 07:00:35 +00:00
Chris Lattner
5297c63565
fix PR3537: if resetting bbi back to the start of a block, we need to
...
forget about already inserted expressions.
llvm-svn: 64362
2009-02-12 06:56:08 +00:00
Nick Lewycky
b92c4d72a7
Don't mark all args to strtod and friends as nocapture.
...
llvm-svn: 64352
2009-02-12 03:18:34 +00:00
Bill Wendling
f6d609a227
Move debug loc info along when the spiller creates new instructions.
...
llvm-svn: 64342
2009-02-12 00:02:55 +00:00
Evan Cheng
6f6abfd94b
Apparently some MachineBasicBlock's don't have corresponding llvm basic blocks.
...
llvm-svn: 64340
2009-02-11 23:42:39 +00:00
Evan Cheng
eb5ec4a0db
Remove a bogus assertion. It's possible a live-in available value is used by a previous instruction.
...
llvm-svn: 64339
2009-02-11 23:41:57 +00:00
Nate Begeman
318aea93bf
the two non-mask arguments to a shufflevector must be the same width, but they do not have to be the same
...
width as the result value.
llvm-svn: 64335
2009-02-11 22:36:25 +00:00
Bill Wendling
27b508db9b
Propagate DebugLoc info for spiller call-backs.
...
llvm-svn: 64329
2009-02-11 21:51:19 +00:00
Dan Gohman
45889d24fe
Fix a comment.
...
llvm-svn: 64328
2009-02-11 21:32:08 +00:00
Dan Gohman
6571ef3577
Don't use special heuristics for nodes with no data predecessors
...
unless they actually have data successors, and likewise for nodes
with no data successors unless they actually have data precessors.
llvm-svn: 64327
2009-02-11 21:29:39 +00:00
Dan Gohman
298a2946f1
Delete the heuristic for non-livein CopyFromReg nodes. Non-liveinness
...
is determined by whether the node has a Flag operand. However, if the
node does have a Flag operand, it will be glued to its register's
def, so the heuristic would end up spuriously applying to whatever
node is the def.
llvm-svn: 64319
2009-02-11 20:25:59 +00:00
Dan Gohman
27f85854f9
Don't try to set an EFLAGS operand to dead if no instruction was created.
...
This fixes a bug introduced by r61215.
llvm-svn: 64316
2009-02-11 19:50:24 +00:00
Dale Johannesen
cc5fc44d02
Make a transformation added in 63266 a bit less aggressive.
...
It was transforming (x&y)==y to (x&y)!=0 in the case where
y is variable and known to have at most one bit set (e.g. z&1).
This is not correct; the expressions are not equivalent when y==0.
I believe this patch salvages what can be salvaged, including
all the cases in bt.ll. Dan, please review.
Fixes gcc.c-torture/execute/20040709-[12].c
llvm-svn: 64314
2009-02-11 19:19:41 +00:00
Bill Wendling
5f14a01340
Revert r64300 and r64301. These were causing the following errors respectively:
...
During llvm-gcc bootstrap:
Undefined symbols:
"llvm::FPPassManager::doFinalization(llvm::Module&)", referenced from:
(anonymous namespace)::CGPassManager::doFinalization(llvm::CallGraph&, llvm::Module&)
in libLLVMipa.a(CallGraphSCCPass.o)
"llvm::FPPassManager::doInitialization(llvm::Module&)", referenced from:
(anonymous namespace)::CGPassManager::doInitialization(llvm::CallGraph&, llvm::Module&)
in libLLVMipa.a(CallGraphSCCPass.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[3]: *** [/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore.roots/llvmCore~obj/obj-llvm/Release/bin/opt] Error 1
During an LLVM release build:
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-register-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenRegisterInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction names with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-enums -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrNames.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td instruction information with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-instr-desc -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenInstrInfo.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Building X86.td assembly writer with tblgen
/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/Release/bin/tblgen -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86 -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target -gen-asm-writer -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Target/X86/Release/X86GenAsmWriter.inc.tmp /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Target/X86/X86.td
llvm[3]: Compiling InstructionCombining.cpp for Release build
if /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmgcc42.roots/llvmgcc42~dst/Developer/usr/bin/llvm-g++-4.2 -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/include -I/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar -D_DEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -O3 -fno-exceptions -Woverloaded-virtual -pedantic -Wall -W -Wwrite-strings -Wno-long-long -Wunused -Wno-unused-parameter -fstrict-aliasing -Wstrict-aliasing -c -MMD -MP -MF "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.lo" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o" -MT "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d" /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvmCore/lib/Transforms/Scalar/InstructionCombining.cpp -o /Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.o ; \
then /bin/mv -f "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Transforms/Scalar/Release/InstructionCombining.d.tmp" "/Volumes/Sandbox/Buildbot/llvm/full-llvm/build/llvm.sh.build/lib/Trans
llvm-svn: 64311
2009-02-11 18:19:24 +00:00
Duncan Sands
5b3349064d
These uses of "inline" can cause strange link-time
...
failures when building with optimization. Just get
rid of them.
llvm-svn: 64301
2009-02-11 12:25:15 +00:00
Duncan Sands
003754f656
Make sure the SCC pass manager initializes any contained
...
function pass managers. Without this, simplify-libcalls
would add nocapture attributes when run on its own, but
not when run as part of -std-compile-opts or similar.
llvm-svn: 64300
2009-02-11 09:58:43 +00:00
Evan Cheng
a1968b0fc7
Implement PR3495: local spiller optimization. The local spiller can now keep availability information over BB boundaries. It visits BB's in depth first order. After visiting a BB if it find a successor which has a single predecessor it visits the successor next without clearing the availability information. This allows the successor to omit reloads or change them into copies.
...
llvm-svn: 64298
2009-02-11 08:24:21 +00:00
Dan Gohman
dfaf646c34
When scheduling a block in parts, keep track of the overall
...
instruction index across each part. Instruction indices are used
to make live range queries, and live ranges can extend beyond
scheduling region boundaries.
Refactor the ScheduleDAGSDNodes class some more so that it
doesn't have to worry about this additional information.
llvm-svn: 64288
2009-02-11 04:27:20 +00:00
Devang Patel
316705027b
If llvm.dbg.region.end is disappearing then remove corresponding llvm.dbg.func.start also.
...
llvm-svn: 64278
2009-02-11 01:29:06 +00:00
Dan Gohman
1262a25683
Don't print extra spaces in vector and array constants. This makes
...
them visually more consistent with vector and array types.
llvm-svn: 64267
2009-02-11 00:25:25 +00:00
Dan Gohman
27fa408b64
Use iterators to iterate through the Preds array instead of
...
an index. This code is on the hot-path because the current
way SDep edges are uniqued has quadratic complexity.
llvm-svn: 64262
2009-02-11 00:12:28 +00:00
Dan Gohman
b3dbb21df1
Consider any instruction that modifies the stack pointer to be
...
a scheduling region boundary. This isn't necessary for
correctness; it helps with compile time, as it avoids the need
for data- and anti-dependencies from all spills and reloads on
the stack-pointer modification.
llvm-svn: 64255
2009-02-10 23:29:38 +00:00
Dan Gohman
b95434356c
Factor out more code for computing register live-range informationfor
...
scheduling, and generalize is so that preserves state across
scheduling regions. This fixes incorrect live-range information around
terminators and labels, which are effective region boundaries.
In place of looking for terminators to anchor inter-block dependencies,
introduce special entry and exit scheduling units for this purpose.
llvm-svn: 64254
2009-02-10 23:27:53 +00:00
Devang Patel
654e47f366
Ignore dbg intrinsic while folding unconditional branch.
...
llvm-svn: 64242
2009-02-10 22:14:17 +00:00
Evan Cheng
589a539423
Handle llvm.x86.sse2.maskmov.dqu in 64-bit.
...
llvm-svn: 64240
2009-02-10 22:06:28 +00:00
Evan Cheng
df15f13c34
80 col violations.
...
llvm-svn: 64237
2009-02-10 21:39:44 +00:00
Devang Patel
da1a632a87
Use early exits. Reduce indentation.
...
llvm-svn: 64226
2009-02-10 19:28:07 +00:00
Dan Gohman
1f517dd1c4
Use const, to support platforms where strrchr returns a const char *.
...
This fixes PR3535.
llvm-svn: 64224
2009-02-10 17:56:28 +00:00
Duncan Sands
d1de45a146
Pacify gcc-4.3 (thinks IsConstant may be used
...
uninitialized).
llvm-svn: 64220
2009-02-10 16:24:55 +00:00
Evan Cheng
ce3bbe515b
Fix PR3457: Ignore control successors when looking for closest scheduled successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated.
...
llvm-svn: 64210
2009-02-10 08:30:11 +00:00
Devang Patel
4bed3565f3
Do not clone llvm.dbg.func.start and corresponding llvm.dbg.region.end during inlining.
...
llvm-svn: 64209
2009-02-10 07:48:18 +00:00
Devang Patel
caf4485781
Enable scalar replacement of AllocaInst whose one of the user is dbg info.
...
llvm-svn: 64207
2009-02-10 07:00:59 +00:00
Devang Patel
9b6c1d6313
Validate file id.
...
llvm-svn: 64204
2009-02-10 06:04:08 +00:00
Sanjiv Gupta
c3f7b82628
Function temporaries can not overlap with retval or args.See the comment in source code to know the reason. Anything having .auto. in its name is local to a function in nature irrespective of the linkage specified. print static local variables in module level IDATA section.
...
llvm-svn: 64199
2009-02-10 04:20:26 +00:00
Evan Cheng
e5ade4a9a1
Implement FpSET_ST1_*.
...
llvm-svn: 64186
2009-02-09 23:32:07 +00:00
Evan Cheng
3af42a8a14
If the target cannot issue a copy for the given source and dest registers, abort instead of silently continue.
...
llvm-svn: 64184
2009-02-09 22:47:36 +00:00
Dale Johannesen
cd19967754
Fix PR 3471, and some cleanups.
...
llvm-svn: 64177
2009-02-09 22:14:15 +00:00
Evan Cheng
fe174df170
Simplify code.
...
llvm-svn: 64164
2009-02-09 21:01:06 +00:00
Evan Cheng
020588cee3
Make sure constant subscript is truncated to ptr size if it may not fit.
...
llvm-svn: 64163
2009-02-09 20:54:38 +00:00
Dan Gohman
a950e99dee
Use doxygen comment syntax.
...
llvm-svn: 64150
2009-02-09 18:12:09 +00:00
Dan Gohman
9280a685db
Use slightly more correct grammar in error messages.
...
llvm-svn: 64148
2009-02-09 17:41:21 +00:00
Gabor Greif
cab008f51f
make sure that BranchInst::getSuccessor() does not assert in cast<>
...
even if the underlying operand is NULL. This may happen in debugging context
within opt with partial loop unrolling (see test/Transforms/LoopUnroll/partial.ll).
After this fix I can resubmit the (backed out) r63459:
* lib/VMCore/AsmWriter.cpp: use precise accessors.
llvm-svn: 64142
2009-02-09 15:45:06 +00:00
Evan Cheng
f736bd9c79
Re-enable machine sinking pass now that the coalescer bugs and the AnalyzeBrnach bug are fixed.
...
llvm-svn: 64126
2009-02-09 08:45:39 +00:00
Evan Cheng
81ae066ab6
Fix another case ShortenDeadCopySrcLiveRange is shortening too much. No test case possible since I don't know what to grep for. :-(
...
llvm-svn: 64125
2009-02-09 08:37:45 +00:00
Evan Cheng
64dfcacd5f
Turns out AnalyzeBranch can modify the mbb being analyzed. This is a nasty
...
suprise to some callers, e.g. register coalescer. For now, add an parameter
that tells AnalyzeBranch whether it's safe to modify the mbb. A better
solution is out there, but I don't have time to deal with it right now.
llvm-svn: 64124
2009-02-09 07:14:22 +00:00
Mikhail Glushenkov
8b5bfbfc7a
Add a Sleep() function.
...
llvm-svn: 64101
2009-02-08 22:47:39 +00:00
Mikhail Glushenkov
a6435d48bc
Add Emacs hints to Alarm.inc.
...
Also removes some trailing whitespace and fixes one 80-column violation.
llvm-svn: 64094
2009-02-08 21:10:57 +00:00
Chris Lattner
1aca40e349
add a note.
...
llvm-svn: 64093
2009-02-08 20:44:19 +00:00
Chris Lattner
c9e1b48449
fix typo
...
llvm-svn: 64091
2009-02-08 20:00:15 +00:00
Chris Lattner
412f626b96
reject void pointers with a nice error:
...
llvm-as: t.ll:2:15: pointers to void are invalid, use i8* instead
%X = type void*
^
instead of asserting and dying.
llvm-svn: 64089
2009-02-08 19:56:22 +00:00
Evan Cheng
b3783639cb
Fix PR3486. Fix a bug in code that manually patch physical register live interval after its sub-register is coalesced with a virtual register.
...
llvm-svn: 64082
2009-02-08 11:04:35 +00:00
Evan Cheng
942519306e
Strengthen the previous check.
...
llvm-svn: 64076
2009-02-08 08:24:28 +00:00
Evan Cheng
fe014df914
r64073 commit message is lost. Here it is:
...
Right now if the coalesced copy def is dead and its src is a kill, and that
there are now other uses within the live range, the coalescer would mark the
def of the source register as dead. But it should also check if there are
other kills which means the value has other uses not in the live range.
llvm-svn: 64075
2009-02-08 08:00:36 +00:00
Evan Cheng
e5e95f7717
(no commit message)
...
llvm-svn: 64073
2009-02-08 07:48:37 +00:00
Bill Wendling
415515077b
Mistakenly turned this on.
...
llvm-svn: 64065
2009-02-08 01:32:00 +00:00
Bill Wendling
5469ec1072
Revert r63999. It was breaking self-hosting builds.
...
llvm-svn: 64062
2009-02-08 00:58:05 +00:00
Chris Lattner
d8f0786c31
Add missing break statements, fixing PR3503.
...
llvm-svn: 64040
2009-02-07 22:37:06 +00:00
Mon P Wang
21eb52a74f
Instrcombine should not change load(cast p) to cast(load p) if the cast
...
changes the address space of the pointer.
llvm-svn: 64035
2009-02-07 22:19:29 +00:00
Dale Johannesen
9c310711bb
Use getDebugLoc forwarder instead of getNode()->getDebugLoc.
...
No functional change.
llvm-svn: 64026
2009-02-07 19:59:05 +00:00
Dan Gohman
747e55bc9a
Constify TargetInstrInfo::EmitInstrWithCustomInserter, allowing
...
ScheduleDAG's TLI member to use const.
llvm-svn: 64018
2009-02-07 16:15:20 +00:00
Nick Lewycky
ef01e112aa
Add an API for strings with possible NULLs in the middle. Refactor the other
...
two AddString methods to use it.
llvm-svn: 64005
2009-02-07 04:57:08 +00:00
Mike Stump
f009a51794
Insert space to avoid warning and make code more readable.
...
llvm-svn: 64003
2009-02-07 03:36:02 +00:00
Dale Johannesen
8ba7132128
Make SDNode constructors take a DebugLoc always.
...
Adjust derived classes to pass UnknownLoc where
a DebugLoc does not make sense. Pick one of
DebugLoc and non-DebugLoc variants to survive
for all such classes.
llvm-svn: 64000
2009-02-07 02:15:05 +00:00
Evan Cheng
9571621665
Enable machine sinking pass in non-fast mode.
...
llvm-svn: 63999
2009-02-07 01:57:46 +00:00
Dale Johannesen
a72d41a67b
Remove now-unused constructors.
...
llvm-svn: 63995
2009-02-07 01:27:09 +00:00
Evan Cheng
47a65a167d
Don't sink the instruction if TargetRegisterInfo::isSafeToMoveRegClassDefs doesn't think it's safe. This works around PR1911.
...
llvm-svn: 63994
2009-02-07 01:21:47 +00:00
Dale Johannesen
4ea526268c
Needs this file too.
...
llvm-svn: 63993
2009-02-07 00:56:46 +00:00
Dale Johannesen
62fd95d6ec
Get rid of the last non-DebugLoc versions of getNode!
...
Many targets build placeholder nodes for special operands, e.g.
GlobalBaseReg on X86 and PPC for the PIC base. There's no
sensible way to associate debug info with these. I've left
them built with getNode calls with explicit DebugLoc::getUnknownLoc operands.
I'm not too happy about this but don't see a good improvement;
I considered adding a getPseudoOperand or something, but it
seems to me that'll just make it harder to read.
llvm-svn: 63992
2009-02-07 00:55:49 +00:00
Dan Gohman
4e3e3deed3
Refactor some repeated logic into a separate function.
...
llvm-svn: 63989
2009-02-07 00:43:41 +00:00
Dan Gohman
78fe44ed52
Make a comment a doxygen comment.
...
llvm-svn: 63988
2009-02-07 00:42:54 +00:00
Dale Johannesen
84935759d5
Remove more non-DebugLoc getNode variants. Use
...
getCALLSEQ_{END,START} to permit passing no DebugLoc
there. UNDEF doesn't logically have DebugLoc; add
getUNDEF to encapsulate this.
llvm-svn: 63978
2009-02-06 23:05:02 +00:00
Dale Johannesen
dc93bbc4b0
And one more file.
...
llvm-svn: 63971
2009-02-06 21:55:48 +00:00
Dale Johannesen
400dc2e2e4
Remove more non-DebugLoc versions of getNode.
...
llvm-svn: 63969
2009-02-06 21:50:26 +00:00
Bill Wendling
b6b0aa2449
Record debug location information in the Dwarf writer.
...
A simple test program shows that debugging works. :-)
llvm-svn: 63968
2009-02-06 21:45:08 +00:00
Bill Wendling
03c34d0d3c
Clear out the CurDebugLoc info when doing a 'clear' on the SDL object.
...
llvm-svn: 63967
2009-02-06 21:36:23 +00:00
Dan Gohman
21cb4114fb
Split the locking out of JIT::runJITOnFunction so that callers
...
that already hold the lock can call an entry point that doesn't
re-acquire the lock.
llvm-svn: 63965
2009-02-06 21:25:08 +00:00
Dan Gohman
af8f994681
Use .size and .type on ELF systems; this helps tools that map
...
addresses to symbols.
llvm-svn: 63962
2009-02-06 21:15:52 +00:00
Dale Johannesen
ab8e4425a3
Eliminate remaining non-DebugLoc version of getTargetNode.
...
llvm-svn: 63951
2009-02-06 19:16:40 +00:00
Dan Gohman
817a24f8e9
Rename SelectionDAGISel::Schedule to
...
SelectionDAGISel::CreateScheduler, and make it just create the
scheduler. Leave running the scheduler to the higher-level code.
This makes the higher-level code a little more explicit and
easier to follow, and will help enable some future refactoring.
llvm-svn: 63944
2009-02-06 18:26:51 +00:00
Sanjiv Gupta
48d6bb9924
Print globl directive for variables with external linkage (global variables).
...
llvm-svn: 63943
2009-02-06 18:24:59 +00:00
Dan Gohman
cd2cd9f5d7
Delete an unused member function.
...
llvm-svn: 63941
2009-02-06 18:19:52 +00:00
Evan Cheng
066757eea1
Move getPointerRegClass from TargetInstrInfo to TargetRegisterInfo.
...
llvm-svn: 63938
2009-02-06 17:43:24 +00:00
Dan Gohman
483377c639
Move ScheduleDAGSDNodes.h to be a private header. Front-ends
...
that previously included this header should include
SchedulerRegistry.h instead.
llvm-svn: 63937
2009-02-06 17:22:58 +00:00
Evan Cheng
b5f0ec3eb7
Add TargetInstrInfo::isSafeToMoveRegisterClassDefs. It returns true if it's safe to move an instruction which defines a value in the register class. Replace pre-splitting specific IgnoreRegisterClassBarriers with this new hook.
...
llvm-svn: 63936
2009-02-06 17:17:30 +00:00
Dan Gohman
f4b08b4f6c
Move ScheduleDAGInstrs.h to be a private header. Front-ends
...
that used this header to select a scheduling policy should
use SchedulerRegistry.h instead (llvm-gcc and clang were
updated a while ago).
llvm-svn: 63934
2009-02-06 17:12:10 +00:00
Devang Patel
7cb8df4ce7
Ignore DbgInfoIntrinsics.
...
llvm-svn: 63923
2009-02-06 06:19:06 +00:00
Chris Lattner
bbbb74372b
fix PR3489, use bits instead of bytes.
...
llvm-svn: 63916
2009-02-06 04:34:07 +00:00
Dale Johannesen
2c4cf2752d
get rid of some non-DebugLoc getTargetNode variants.
...
llvm-svn: 63909
2009-02-06 02:08:06 +00:00
Dale Johannesen
9f3f72f144
Get rid of one more non-DebugLoc getNode and
...
its corresponding getTargetNode. Lots of
caller changes.
llvm-svn: 63904
2009-02-06 01:31:28 +00:00
Owen Anderson
5a043f2cb1
Fix a crasher: we need to check that the function is non-null before using it!
...
llvm-svn: 63902
2009-02-06 00:13:43 +00:00
Owen Anderson
98a3617fba
Refactor my previous change to maintain the distinction between AliasAnalysis and BasicAliasAnalysis. This involves some wider changes because it
...
folds away some never-used methods.
llvm-svn: 63900
2009-02-05 23:36:27 +00:00
Devang Patel
409b794cfe
Ignore dbg intrinsics while propagating conditional expression info. Take 2.
...
llvm-svn: 63898
2009-02-05 23:32:52 +00:00
Evan Cheng
2599084ac5
isAsCheapAsMove instructions can have register src operands. Check if they are really re-materializable.
...
This fixes sse.expandfft and sse.stepfft.
llvm-svn: 63890
2009-02-05 22:24:17 +00:00
Dale Johannesen
f80493bbfd
Remove a non-DebugLoc version of getNode.
...
llvm-svn: 63889
2009-02-05 22:07:54 +00:00
Devang Patel
02f58e1e8d
Revert rev. 63876. It is causing llvm-gcc bootstrap failure.
...
llvm-svn: 63888
2009-02-05 21:46:41 +00:00
Dale Johannesen
3eb373f5ce
Remove 3 non-DebugLoc variants of getNode.
...
llvm-svn: 63886
2009-02-05 21:20:44 +00:00
Devang Patel
58cb603d2a
Remove dead blocks in the end.
...
llvm-svn: 63880
2009-02-05 19:59:42 +00:00
Devang Patel
5922e26d1a
Ignore dbg intrinsics while propagating conditional expression info.
...
llvm-svn: 63876
2009-02-05 19:15:39 +00:00
Evan Cheng
9d8bfbfdef
Machine LICM increases register pressure and it almost always increase code size. For now, disable it for optimizing for size.
...
llvm-svn: 63856
2009-02-05 08:51:13 +00:00
Evan Cheng
409c25f78d
Turn on machine LICM in non-fast mode.
...
llvm-svn: 63855
2009-02-05 08:46:33 +00:00
Evan Cheng
399660c384
Teach machine licm to CSE hoisted instructions.
...
llvm-svn: 63854
2009-02-05 08:45:46 +00:00
Evan Cheng
0f734469eb
ReMaterializeTrivialDef need to trim the live interval to the last kill if the copy kills the source register. This fixes uint64tof64.ll after ARM::MOVi is marked as isAsCheapAsAMove.
...
llvm-svn: 63853
2009-02-05 08:45:04 +00:00
Evan Cheng
64fdacc27f
A few more isAsCheapAsAMove.
...
llvm-svn: 63852
2009-02-05 08:42:55 +00:00
Chris Lattner
7e1d2862ca
if we have a large GEP offset on a 32-bit or other target, make
...
sure to print the value properly sext'd to the right pointer size.
This fixes PR3481.
llvm-svn: 63843
2009-02-05 06:55:21 +00:00
Owen Anderson
7411523ee6
Pre-alloc splitting needs to be more careful to avoid inserting spills/restores
...
between call frame setup/restore points. Unfortunately, this regresses
code size a bit, but at least it's correct now!
llvm-svn: 63837
2009-02-05 05:58:41 +00:00
Mon P Wang
3f0e0a6dea
Fix a bug where we were not emitting a cvt rnd sat node for converting
...
between a unsigned integer and signed integer.
llvm-svn: 63831
2009-02-05 04:47:42 +00:00
Dale Johannesen
b842d529a3
Reapply 63765. Patches for clang and llvm-gcc to follow.
...
llvm-svn: 63812
2009-02-05 01:49:45 +00:00
Dale Johannesen
12c572b6fa
Get rid of 3 non-DebugLoc getNode variants.
...
llvm-svn: 63808
2009-02-05 01:01:16 +00:00
Devang Patel
086b212277
Ignore dbg intrinsics while folding switch instruction.
...
llvm-svn: 63802
2009-02-05 00:30:42 +00:00
Dale Johannesen
7ae8c8b108
Remove non-DebugLoc versions of getMergeValues, ZeroExtendInReg.
...
llvm-svn: 63800
2009-02-05 00:20:09 +00:00
Dale Johannesen
f08a47bb70
Remove non-DebugLoc forms of CopyToReg and CopyFromReg.
...
Adjust callers.
llvm-svn: 63789
2009-02-04 23:02:30 +00:00
Dale Johannesen
ae616c2c61
Reverting 63765. This broke the build of both clang
...
and llvm-gcc.
llvm-svn: 63786
2009-02-04 22:47:25 +00:00
Devang Patel
916fdce16d
Ignore dbg intrinsics.
...
llvm-svn: 63781
2009-02-04 21:39:48 +00:00
Stuart Hastings
556bd92698
80 column rule.
...
llvm-svn: 63768
2009-02-04 20:30:10 +00:00
Dale Johannesen
021052a705
Remove non-DebugLoc versions of getLoad and getStore.
...
Adjust the many callers of those versions.
llvm-svn: 63767
2009-02-04 20:06:27 +00:00
Nate Begeman
6ae3aa83d0
New feature: add support for target intrinsics being defined in the
...
target directories themselves. This also means that VMCore no longer
needs to know about every target's list of intrinsics. Future work
will include converting the PowerPC target to this interface as an
example implementation.
llvm-svn: 63765
2009-02-04 19:47:21 +00:00
Mon P Wang
34650735d0
Avoids generating a legalization assert for the case where a vector type is legal
...
but when legalizing the operation, we split the vector type and generate a library
call whose type needs to be promoted. For example, X86 with SSE on but MMX off,
a divide v2i64 will be scalarized to 2 calls to a library using i64.
llvm-svn: 63760
2009-02-04 19:38:14 +00:00
Chris Lattner
e84a7911c4
Bill implemented this.
...
llvm-svn: 63752
2009-02-04 19:09:07 +00:00
Chris Lattner
553fd7e1eb
add a note, this is why we're faster at SciMark-MonteCarlo with
...
SSE disabled.
llvm-svn: 63751
2009-02-04 19:08:01 +00:00
Evan Cheng
9ec370f748
Skip over zero registers.
...
llvm-svn: 63748
2009-02-04 18:18:58 +00:00
Chris Lattner
370ec10dad
allow main to have any integer type.
...
llvm-svn: 63743
2009-02-04 17:48:18 +00:00
Dan Gohman
556d14d483
Minor code cleanups; no functionality change.
...
llvm-svn: 63740
2009-02-04 17:28:58 +00:00
Stuart Hastings
ffee3d831a
Since I'm obliged to work with a development OS that currently doesn't
...
support GraphViz, I've been using the foo->dump() facility. This
patch is a minor rewrite to the SelectionDAG dump() stuff to make it a
little more helpful. The existing foo->dump() functionality does not
change; this patch adds foo->dumpr(). All of this is only useful when
running LLVM under a debugger.
llvm-svn: 63736
2009-02-04 16:46:19 +00:00
Duncan Sands
e7d5479136
Allow the inverse transform x86_fp80 -> i80 (also
...
fires during the Ada build).
llvm-svn: 63731
2009-02-04 11:17:06 +00:00
Duncan Sands
1ea1173143
Fix PR3468: a crash when constant folding a bitcast of
...
i80 to x86 long double (this was presumably generated
by sroa).
llvm-svn: 63730
2009-02-04 10:17:14 +00:00
Evan Cheng
4ded601445
Don't call isInvariantLoad twice.
...
llvm-svn: 63729
2009-02-04 09:21:58 +00:00
Evan Cheng
1d9f7ac8cc
Don't bother hoisting out a "cheap" instruction if all of its uses are PHIs. LICM "cheap" instructions are not particularly beneficial to start with. This will just end up making the copies harder to coalesce.
...
llvm-svn: 63728
2009-02-04 09:19:56 +00:00
Evan Cheng
0649abdfe2
For now, only hoist re-materilizable instructions. LICM will increase register pressure. We want to avoid spilling more instructions if it's possible.
...
llvm-svn: 63725
2009-02-04 07:17:49 +00:00
Nick Lewycky
a89ec99fa2
Reapply patch from r62553, with a fix to avoid looking for an ffi.h that isn't
...
there.
This changes the interpreter to use libffi. After this patch, the interpreter
will barely be able to call any external functions if built on a system without
libffi installed (just enough to pass 'make check' really). But with libffi,
we can now call any function that isn't variadic or taking a struct or vector
parameter (but pointer to struct is fine). Patch by Alexei Svitkine!
llvm-svn: 63723
2009-02-04 06:26:47 +00:00
Owen Anderson
1caf7fef8e
Finish making AliasAnalysis aware of the fact that most atomic intrinsics only dereference their arguments, and enhance
...
BasicAA to make use of this fact when computing ModRef info.
llvm-svn: 63718
2009-02-04 05:16:46 +00:00
Dale Johannesen
679073b420
Remove non-DebugLoc forms of the exotic forms
...
of Lod and Sto; patch uses.
llvm-svn: 63716
2009-02-04 02:34:38 +00:00