Douglas Gregor
df09a2aade
Add is_same type trait
...
llvm-svn: 84029
2009-10-13 21:17:00 +00:00
Duncan Sands
18a956cb4a
Introduce new convenience methods for sign extending or
...
truncating an SDValue (depending on whether the target
type is bigger or smaller than the value's type); or zero
extending or truncating it. Use it in a few places (this
seems to be a popular operation, but I only modified cases
of it in SelectionDAGBuild). In particular, the eh_selector
lowering was doing this wrong due to a repeated rather than
inverted test, fixed with this change.
llvm-svn: 84027
2009-10-13 21:04:12 +00:00
Dale Johannesen
fd04c74bc0
Add an "msasm" flag to inline asm as suggested in PR 5125.
...
A little ugliness is accepted to keep the binary file format
compatible. No functional change yet.
llvm-svn: 84020
2009-10-13 20:46:56 +00:00
Dan Gohman
2ccea5d13f
Split code not specific to Function inlining out into a separate class,
...
named CodeMetrics. Move it to be a non-nested class. Rename RegionInfo
back to FunctionInfo.
llvm-svn: 84013
2009-10-13 19:58:07 +00:00
Ted Kremenek
5d81cb2084
Provide a mode for ImmutableMap/ImmutableSet to not automatically canonicalize the internal functional AVL trees. This should speedup clients that use ImmutableMap/ImmutableSet but don't require fast comparisons of maps.
...
llvm-svn: 84010
2009-10-13 19:08:10 +00:00
Dan Gohman
4552e3cd73
Move the InlineCost code from Transforms/Utils to Analysis.
...
llvm-svn: 83998
2009-10-13 18:30:07 +00:00
Dan Gohman
5b3e05bcaa
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
f98e981cd0
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
e6f26a7415
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
1008612b36
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
6f7d8347c1
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
799dd8538e
remove dead header.
...
llvm-svn: 83943
2009-10-13 05:33:26 +00:00
Dan Gohman
c4e367b854
Add a ceilLogBase2 function to APInt.
...
llvm-svn: 83932
2009-10-13 01:49:02 +00:00
Edward O'Callaghan
a5314b83d1
Regenerate configure for rev. 83823 putback.
...
llvm-svn: 83930
2009-10-13 01:01:38 +00:00
Devang Patel
9da3cc2b2d
Enable "debug info attached to an instruction" mode.
...
llvm-svn: 83925
2009-10-12 23:22:09 +00:00
Dale Johannesen
06243d7bf2
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
406ac811ab
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
a8bacea11b
Delete some obsolete declarations.
...
llvm-svn: 83856
2009-10-12 16:43:44 +00:00
Chris Lattner
40cf28d6eb
add some more hooks to the C bindings, patch by Kenneth Uildriks!
...
llvm-svn: 83821
2009-10-12 04:01:02 +00:00
Edward O'Callaghan
396ed2bcaa
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
c7cf0b223b
Fix typo.
...
llvm-svn: 83780
2009-10-11 18:53:09 +00:00
Nick Lewycky
5246987a76
Fix typo.
...
llvm-svn: 83779
2009-10-11 18:47:33 +00:00
Chris Lattner
d1d23e1949
add a helper for matching "1".
...
llvm-svn: 83760
2009-10-11 07:51:25 +00:00
Chris Lattner
09677258e5
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
bb094e12f2
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
9c382cebc5
add a simple helper method.
...
llvm-svn: 83745
2009-10-10 23:41:48 +00:00
Chris Lattner
249265de06
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
67cdd8b567
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
e474a8d3a7
rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect
...
what it does.
llvm-svn: 83740
2009-10-10 22:41:58 +00:00
Chris Lattner
60d4e69c81
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
71db463fcf
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
a0424f5372
change some static_cast into cast, pointed out by Gabor.
...
llvm-svn: 83703
2009-10-10 08:01:27 +00:00
Chris Lattner
99e02edef8
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
a22f2d8614
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
e919de5acf
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
918ec53c64
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
87b02d5bbc
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
df45c7f642
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
307c053f2e
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
f4eb6777e5
Add a const qualifier.
...
llvm-svn: 83677
2009-10-09 22:09:05 +00:00
Dale Johannesen
96a5b87ae2
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
dd76bb23d1
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
fc8809d0ac
Raise the limit on built-in plugins in llvmc to 10.
...
llvm-svn: 83614
2009-10-09 04:15:52 +00:00
Evan Cheng
f5970a019e
Indentation.
...
llvm-svn: 83607
2009-10-09 00:57:38 +00:00
Dan Gohman
816fe0a4aa
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
2a45a65511
Add a SelectionDAG getTargetInsertSubreg convenience function,
...
similar to getTargetExtractSubreg.
llvm-svn: 83564
2009-10-08 18:49:46 +00:00
Dan Gohman
09984279fd
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
78765deded
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
c0615aa17f
Re-enable register scavenging in Thumb1 by default.
...
llvm-svn: 83521
2009-10-08 01:46:59 +00:00
Jim Grosbach
456735c54b
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