Dan Gohman
18cdd7ef1b
Move the InlineCost code from Transforms/Utils to Analysis.
...
llvm-svn: 83998
2009-10-13 18:30:07 +00:00
Dan Gohman
f277c57aad
Start refactoring the inline cost estimation code so that it can be used
...
for purposes other than inlining.
llvm-svn: 83997
2009-10-13 18:24:11 +00:00
Jeffrey Yasskin
3eacbf419d
Make the ExecutionEngine automatically remove global mappings on when their
...
GlobalValue is destroyed. Function destruction still leaks machine code and
can crash on leaked stubs, but this is some progress.
llvm-svn: 83987
2009-10-13 17:42:08 +00:00
Devang Patel
729589a539
Copy metadata when value is RAUW'd. It is debatable whether this is the right approach for custom metadata data in general. However, right now the only custom data user, "dbg", expects this behavior while FE is constructing llvm IR with debug info.
...
llvm-svn: 83977
2009-10-13 17:00:54 +00:00
Duncan Sands
73a4348b00
The eh.exception intrinsic only reads from memory, it doesn't
...
write to it.
llvm-svn: 83963
2009-10-13 09:24:02 +00:00
Nick Lewycky
ab1dbddc83
Add new "memory use marker" intrinsics. These indicate lifetimes and invariant
...
sections of memory objects.
llvm-svn: 83953
2009-10-13 07:03:23 +00:00
Chris Lattner
8fbbd25816
remove dead header.
...
llvm-svn: 83943
2009-10-13 05:33:26 +00:00
Dan Gohman
f9067da535
Add a ceilLogBase2 function to APInt.
...
llvm-svn: 83932
2009-10-13 01:49:02 +00:00
Edward O'Callaghan
eb42ded22c
Regenerate configure for rev. 83823 putback.
...
llvm-svn: 83930
2009-10-13 01:01:38 +00:00
Devang Patel
21a7babc56
Enable "debug info attached to an instruction" mode.
...
llvm-svn: 83925
2009-10-12 23:22:09 +00:00
Dale Johannesen
38c9b68ccf
Revert the kludge in 76703. I got a clean
...
bootstrap of FSF-style PPC, so there is some
reason to believe the original bug (which was
never analyzed) has been fixed, probably by
82266.
llvm-svn: 83871
2009-10-12 18:49:00 +00:00
Jeffrey Yasskin
7d85d5a366
Fix http://llvm.org/PR5160 , to let CallbackVHs modify other ValueHandles on the
...
same Value without breaking things.
llvm-svn: 83861
2009-10-12 17:43:32 +00:00
Dan Gohman
44c9c11439
Delete some obsolete declarations.
...
llvm-svn: 83856
2009-10-12 16:43:44 +00:00
Edward O'Callaghan
af49208035
Fix LLVM CMake build system so that it may now work on Solaris and AuroraUX.
...
llvm-svn: 83819
2009-10-12 04:00:11 +00:00
Nick Lewycky
9d708ff741
Fix typo.
...
llvm-svn: 83780
2009-10-11 18:53:09 +00:00
Nick Lewycky
a958e6eedf
Fix typo.
...
llvm-svn: 83779
2009-10-11 18:47:33 +00:00
Chris Lattner
2a0366af9e
add a helper for matching "1".
...
llvm-svn: 83760
2009-10-11 07:51:25 +00:00
Chris Lattner
a9bbfdf699
there is no need to run mem2reg after jump threading at LTO time now.
...
llvm-svn: 83753
2009-10-11 04:17:33 +00:00
Chris Lattner
969d1df7ba
fix a bunch of bad formatting, delete the dead
...
ConstantInt::TheTrueVal/TheFalseVal members.
llvm-svn: 83752
2009-10-11 04:03:22 +00:00
Chris Lattner
0aa320ae4d
add a simple helper method.
...
llvm-svn: 83745
2009-10-10 23:41:48 +00:00
Chris Lattner
acf73d9839
add ability for clients of SSAUpdater to find out about the
...
PHI nodes inserted.
llvm-svn: 83744
2009-10-10 23:15:24 +00:00
Chris Lattner
db4d523cca
add the ability to get a rewritten value from the middle of a block,
...
not just at the end. Add a big comment explaining when this could
be useful (which never happens for jump threading).
llvm-svn: 83741
2009-10-10 23:00:11 +00:00
Chris Lattner
9899ce267c
rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect
...
what it does.
llvm-svn: 83740
2009-10-10 22:41:58 +00:00
Chris Lattner
9c5aa00411
Implement an efficient and fully general SSA update mechanism that
...
works on unstructured CFGs. This implements PR217, our oldest open PR.
llvm-svn: 83705
2009-10-10 09:04:27 +00:00
Chris Lattner
54621efc37
add some WeakVH::operator='s. Without these, assigning
...
a Value* to a WeakVH was constructing a temporary WeakVH
(due to the implicit assignment operator). This avoids
that cost.
llvm-svn: 83704
2009-10-10 08:27:29 +00:00
Chris Lattner
70895041a7
change some static_cast into cast, pointed out by Gabor.
...
llvm-svn: 83703
2009-10-10 08:01:27 +00:00
Chris Lattner
76985b43e3
add a version of PHINode::getIncomingBlock that takes a raw
...
Use, to complement the version that takes a use_iterator.
llvm-svn: 83702
2009-10-10 07:42:42 +00:00
Dan Gohman
3b025b778b
Make getMachineNode return a MachineSDNode* instead of a generic SDNode*
...
since it won't do any folding. This will help avoid some inconvenient
casting.
llvm-svn: 83698
2009-10-10 01:29:16 +00:00
Dan Gohman
177b8de981
Replace X86's CanRematLoadWithDispOperand by calling the target-independent
...
MachineInstr::isInvariantLoad instead, which has the benefit of being
more complete.
llvm-svn: 83696
2009-10-10 00:34:18 +00:00
Dan Gohman
5141b26ffa
The ScheduleDAG framework now requires an AliasAnalysis argument, though
...
it isn't needed in the ScheduleDAGSDNodes schedulers.
llvm-svn: 83691
2009-10-09 23:33:48 +00:00
Dan Gohman
5bfc2416fe
Factor out LiveIntervalAnalysis' code to determine whether an instruction
...
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.
This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.
llvm-svn: 83687
2009-10-09 23:27:56 +00:00
Devang Patel
c97c44b584
Extract scope information from the variable itself, instead of relying on alloca or llvm.dbg.declare location.
...
While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself.
llvm-svn: 83684
2009-10-09 22:42:28 +00:00
Jeffrey Yasskin
7edab17bef
ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverse
...
mappings, which could cause errors and assert-failures. This patch fixes that,
adds a test, and refactors the global-mapping-removal code into a single place.
llvm-svn: 83678
2009-10-09 22:10:27 +00:00
Dan Gohman
14aaff93fc
Add a const qualifier.
...
llvm-svn: 83677
2009-10-09 22:09:05 +00:00
Dale Johannesen
7691b73da0
Use names instead of numbers for some of the magic
...
constants used in inlining heuristics (especially
those used in more than one file). No functional change.
llvm-svn: 83675
2009-10-09 21:42:02 +00:00
Dan Gohman
4fe1a982ed
Add basic infrastructure and x86 support for preserving MachineMemOperand
...
information when unfolding memory references.
llvm-svn: 83656
2009-10-09 18:10:05 +00:00
Mikhail Glushenkov
59c2ae922b
Raise the limit on built-in plugins in llvmc to 10.
...
llvm-svn: 83614
2009-10-09 04:15:52 +00:00
Evan Cheng
f852810de8
Indentation.
...
llvm-svn: 83607
2009-10-09 00:57:38 +00:00
Dan Gohman
4cdd530887
Add the ability to track HasNSW and HasNUW on more kinds of SCEV expressions.
...
llvm-svn: 83601
2009-10-09 00:10:36 +00:00
Bob Wilson
72c8f63e50
Add a SelectionDAG getTargetInsertSubreg convenience function,
...
similar to getTargetExtractSubreg.
llvm-svn: 83564
2009-10-08 18:49:46 +00:00
Dan Gohman
68e044e81a
Add a form of addPreserved which takes a string argument, to allow passes
...
to declare that they preserve other passes without needing to pull in
additional header file or library dependencies. Convert MachineFunctionPass
and CodeGenLICM to make use of this.
llvm-svn: 83555
2009-10-08 17:00:02 +00:00
Chris Lattner
41b5fd5218
remove LoopVR pass. According to Nick:
...
"LoopVR's logic was copied into ScalarEvolution::getUnsignedRange and
::getSignedRange. Please delete LoopVR."
llvm-svn: 83531
2009-10-08 06:42:44 +00:00
Jim Grosbach
a3e1149941
Re-enable register scavenging in Thumb1 by default.
...
llvm-svn: 83521
2009-10-08 01:46:59 +00:00
Jim Grosbach
cb905d28a8
reverting thumb1 scavenging default due to test failure while I figure out what's up.
...
llvm-svn: 83501
2009-10-07 22:49:41 +00:00
Chris Lattner
41e4cd7ef4
second half of lazy liveness removal.
...
llvm-svn: 83500
2009-10-07 22:49:30 +00:00
Jim Grosbach
cc952b2ff8
Enable thumb1 register scavenging by default.
...
llvm-svn: 83496
2009-10-07 22:26:31 +00:00
Devang Patel
a7456a1335
Extract subprogram and compile unit information from the debug info attached to an instruction.
...
llvm-svn: 83491
2009-10-07 22:04:08 +00:00
Dan Gohman
b95136e649
Replace TargetInstrInfo::isInvariantLoad and its target-specific
...
implementations with a new MachineInstr::isInvariantLoad, which uses
MachineMemOperands and is target-independent. This brings MachineLICM
and other functionality to targets which previously lacked an
isInvariantLoad implementation.
llvm-svn: 83475
2009-10-07 17:38:06 +00:00
Jim Grosbach
61c5ce1bde
Add register-reuse to frame-index register scavenging. When a target uses
...
a virtual register to eliminate a frame index, it can return that register
and the constant stored there to PEI to track. When scavenging to allocate
for those registers, PEI then tracks the last-used register and value, and
if it is still available and matches the value for the next index, reuses
the existing value rather and removes the re-materialization instructions.
Fancier tracking and adjustment of scavenger allocations to keep more
values live for longer is possible, but not yet implemented and would likely
be better done via a different, less special-purpose, approach to the
problem.
eliminateFrameIndex() is modified so the target implementations can return
the registers they wish to be tracked for reuse.
ARM Thumb1 implements and utilizes the new mechanism. All other targets are
simply modified to adjust for the changed eliminateFrameIndex() prototype.
llvm-svn: 83467
2009-10-07 17:12:56 +00:00
Torok Edwin
8203691f27
Add a comment explaining how DenseMap::insert works, because it is not
...
intuitive.
It does NOT update the value if the key is already in the map,
it also returns false if the key is already in the map, regardless
if the value matched.
llvm-svn: 83458
2009-10-07 09:23:56 +00:00