Jim Grosbach
7af2399458
When the scavenger is looking for a good candidate location to restore from a
...
spill, it should avoid doing so inside the live range of a virtual register.
llvm-svn: 85026
2009-10-25 00:45:07 +00:00
Dan Gohman
07044648b2
MapValue doesn't needs its LLVMContext argument.
...
llvm-svn: 85020
2009-10-24 23:37:16 +00:00
Dan Gohman
1e96c6acaf
Rename isLoopExit to isLoopExiting, for consistency with the wording
...
used elsewhere - an exit block is a block outside the loop branched to
from within the loop. An exiting block is a block inside the loop that
branches out.
llvm-svn: 85019
2009-10-24 23:34:26 +00:00
Dan Gohman
477456910a
Rewrite LoopRotation's SSA updating code using SSAUpdater.
...
llvm-svn: 85016
2009-10-24 23:19:52 +00:00
Dan Gohman
e970f8a450
Make DominanceFrontierBase::print's output prettier.
...
llvm-svn: 85011
2009-10-24 20:01:11 +00:00
Sanjiv Gupta
ec0d345a46
Revert back 85006 for now as it breaks PIC16 tests.
...
llvm-svn: 85008
2009-10-24 18:19:41 +00:00
Sanjiv Gupta
1fcb847e01
Adding support for placing global objects in shared data memory.
...
llvm-svn: 85006
2009-10-24 18:02:44 +00:00
Chris Lattner
5f456758c6
various cleanups suggested by Duncan
...
llvm-svn: 84993
2009-10-24 05:27:19 +00:00
Chris Lattner
9a1f5c9f90
fix PR5287, a serious regression from my previous patches. Thanks to
...
Duncan for the nice tiny testcase.
llvm-svn: 84992
2009-10-24 05:22:15 +00:00
Victor Hernandez
e8998896f5
Auto-upgrade free instructions to calls to the builtin free function.
...
Update all analysis passes and transforms to treat free calls just like FreeInst.
Remove RaiseAllocations and all its tests since FreeInst no longer needs to be raised.
llvm-svn: 84987
2009-10-24 04:23:03 +00:00
Evan Cheng
0e5c6b3b69
80 col violation.
...
llvm-svn: 84986
2009-10-24 02:07:42 +00:00
Anton Korobeynikov
0e56d9fdb7
Add some asserts to catch copyRegToReg() fails early
...
llvm-svn: 84983
2009-10-24 00:27:00 +00:00
Jim Grosbach
e295e49760
Restrict Thumb1 register allocation to low registers, even for instructions that
...
can access the hi regs. Our prologue and epilogue code doesn't know how to
properly handle save/restore of the hi regs, so things go badly when we alloc
them.
llvm-svn: 84982
2009-10-24 00:19:24 +00:00
Evan Cheng
82de095652
Identity copies should not contribute to spill weight.
...
llvm-svn: 84978
2009-10-23 23:09:19 +00:00
Jim Grosbach
5b5a404677
FIXME no longer applies. R12 and R3 are available for allocation
...
llvm-svn: 84977
2009-10-23 23:07:42 +00:00
Jeffrey Yasskin
8ff8b897a5
Fix http://llvm.org/PR4822 : allow module deletion after a function has been
...
compiled.
When functions are compiled, they accumulate references in the JITResolver's
stub maps. This patch removes those references when the functions are
destroyed. It's illegal to destroy a Function when any thread may still try to
call its machine code.
This patch also updates r83987 to use ValueMap instead of explicit CallbackVHs
and fixes a couple "do stuff inside assert()" bugs from r84522.
llvm-svn: 84975
2009-10-23 22:37:43 +00:00
Victor Hernandez
8428eb5720
Remove AllocationInst. Since MallocInst went away, AllocaInst is the only subclass of AllocationInst, so it no longer is necessary.
...
llvm-svn: 84969
2009-10-23 21:09:37 +00:00
Dan Gohman
b15fee5666
APInt-ify the gep scaling code, so that it correctly handles the case where
...
the scale overflows pointer-sized arithmetic. This fixes PR5281.
llvm-svn: 84954
2009-10-23 17:57:43 +00:00
Dan Gohman
ad2555c9a3
Make LoopDeletion check the maximum backedge taken count, rather than the
...
exact backedge taken count, when checking for infinite loops. This allows
it to delete loops with multiple exit conditions.
llvm-svn: 84952
2009-10-23 17:10:01 +00:00
Chris Lattner
d1dbcae98f
some stuff is done, we still have constantexpr simplification to do.
...
llvm-svn: 84943
2009-10-23 07:00:55 +00:00
Chris Lattner
4874f5bce5
teach libanalysis to simplify vector loads with bitcast sources. This
...
implements something out of Target/README.txt producing:
_foo: ## @foo
movl 4(%esp), %eax
movapd LCPI1_0, %xmm0
movapd %xmm0, (%eax)
ret $4
instead of:
_foo: ## @foo
movl 4(%esp), %eax
movapd _b, %xmm0
mulpd LCPI1_0, %xmm0
addpd _a, %xmm0
movapd %xmm0, (%eax)
ret $4
llvm-svn: 84942
2009-10-23 06:57:37 +00:00
Chris Lattner
2ee1f0f0b5
enhance FoldReinterpretLoadFromConstPtr to handle loads of up to 32
...
bytes (i256).
llvm-svn: 84941
2009-10-23 06:50:36 +00:00
Chris Lattner
b1d2706a4c
teach libanalysis to fold int and fp loads from almost arbitrary
...
non-type-safe constant initializers. This sort of thing happens
quite a bit for 4-byte loads out of string constants, unions,
bitfields, and an interesting endianness check from sqlite, which
is something like this:
const int sqlite3one = 1;
# define SQLITE_BIGENDIAN (*(char *)(&sqlite3one)==0)
# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
all of these macros now constant fold away.
This implements PR3152 and is based on a patch started by Eli, but heavily
modified and extended.
llvm-svn: 84936
2009-10-23 06:23:49 +00:00
Evan Cheng
0db11ae5a2
X86 needs critical path anti-dependency breaking.
...
llvm-svn: 84931
2009-10-23 05:57:35 +00:00
Dale Johannesen
3f91e235b8
Commit fixes for half precision I noted in review, so
...
they don't get lost; I don't think the originator has
write access.
llvm-svn: 84928
2009-10-23 04:02:51 +00:00
Victor Hernandez
48872a3306
Minor code cleanup.
...
llvm-svn: 84919
2009-10-23 00:59:10 +00:00
Bill Wendling
283fb69c0a
Neuter stack protectors by only checking character arrays. This is what GCC
...
does.
llvm-svn: 84916
2009-10-23 00:01:05 +00:00
David Goodwin
82c1dd9754
Allow the target to select the level of anti-dependence breaking that should be performed by the post-RA scheduler. The default is none.
...
llvm-svn: 84911
2009-10-22 23:19:17 +00:00
Ted Kremenek
b9ff937285
Use 'waitpid' instead of 'wait'. Basing Program::Wait() on 'wait()' prevents it being correct within a multithreaded context.
...
This address: PR 5277 (Program::Wait is unsafe to call from multiple threads).
Note: If waitpid() turns out to be non-portable, we can add more autoconf magic, or look into
another solution.
llvm-svn: 84903
2009-10-22 22:16:17 +00:00
Benjamin Kramer
13aa437a5e
Random include cleanup.
...
llvm-svn: 84898
2009-10-22 21:49:41 +00:00
Jeffrey Yasskin
7ed6722fc4
Fix OProfileJITEventListener after r84054 renamed CompileUnit to Scope.
...
llvm-svn: 84895
2009-10-22 20:57:35 +00:00
Bill Wendling
c6d3a6ed66
Tidying up some code and comments. No functionality change.
...
llvm-svn: 84894
2009-10-22 20:48:59 +00:00
Devang Patel
5c461d6dcd
Hide MetadataContext implementation details.
...
llvm-svn: 84886
2009-10-22 19:36:54 +00:00
Devang Patel
2a0e2f1794
Fix getMDs() interface such that it does not expose implementation details.
...
llvm-svn: 84885
2009-10-22 18:55:16 +00:00
Devang Patel
1fa3e26912
Using TrackingVH instead of WeakVH or WeakMetadataVH.
...
llvm-svn: 84884
2009-10-22 18:25:28 +00:00
Devang Patel
944cbf7647
Sort handler names to ensure deterministic behavior.
...
llvm-svn: 84878
2009-10-22 17:40:37 +00:00
Bob Wilson
8f4f73da55
Revert 84843. Evan, this was breaking some of the if-conversion tests.
...
llvm-svn: 84868
2009-10-22 16:52:21 +00:00
Nicolas Geoffray
7955fa8d35
Verify that the function and exception table have been allocated
...
before freeing them.
llvm-svn: 84859
2009-10-22 14:35:57 +00:00
Benjamin Kramer
b159c164d2
Shift art to the right to keep GCC from complaining about multi-line comments.
...
llvm-svn: 84849
2009-10-22 09:28:49 +00:00
Evan Cheng
2edd1efa46
Move if-conversion before post-regalloc scheduling so the predicated instruction get scheduled properly.
...
llvm-svn: 84843
2009-10-22 06:48:32 +00:00
Evan Cheng
d411ac1267
Load / store multiple was missing opportunites when the load / store bundles are at the end of the bb. Test case is already in, the bug is exposed by subsequent commit.
...
llvm-svn: 84842
2009-10-22 06:47:35 +00:00
Chris Lattner
cd80b1711b
move another load optimization from instcombine -> libanalysis.
...
llvm-svn: 84841
2009-10-22 06:44:07 +00:00
Chris Lattner
3fb4c19b7d
move 'loading i32 from string' optimization from instcombine
...
to libanalysis. Instcombine shrinking... does this even
make sense???
llvm-svn: 84840
2009-10-22 06:38:35 +00:00
Chris Lattner
2c8c8533b1
Move some constant folding logic for loads out of instcombine into
...
Analysis/ConstantFolding.cpp. This doesn't change the behavior of
instcombine but makes other clients of ConstantFoldInstruction
able to handle loads. This was partially extracted from Eli's patch
in PR3152.
llvm-svn: 84836
2009-10-22 06:25:11 +00:00
Evan Cheng
0c6aa52214
Trim more includes.
...
llvm-svn: 84832
2009-10-22 05:11:00 +00:00
Evan Cheng
166f455456
Trim include.
...
llvm-svn: 84831
2009-10-22 05:08:49 +00:00
Chris Lattner
e0932e92e9
fix warning.
...
llvm-svn: 84826
2009-10-22 03:42:27 +00:00
Devang Patel
6df2865e24
Fix getHandlerNames() interface. Now it populate clinet supplied small vector with handler names.
...
llvm-svn: 84820
2009-10-22 01:01:24 +00:00
Evan Cheng
8fdd1661fa
Don't generate sbfx / ubfx with negative lsb field. Patch by David Conrad.
...
llvm-svn: 84813
2009-10-22 00:40:00 +00:00
Devang Patel
125861a48c
Use StringRef to construct MDString.
...
llvm-svn: 84811
2009-10-22 00:22:05 +00:00