Commit Graph

52767 Commits

Author SHA1 Message Date
Chris Lattner
c6c167f3bf rename a file, remove a poorly reduced testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83757 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 07:10:28 +00:00
Chris Lattner
6b65f47ad5 restructure some code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83756 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 04:40:21 +00:00
Chris Lattner
bdbf1a177d factor some code better and move a function, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83755 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 04:33:43 +00:00
Chris Lattner
e33583b7c2 make jump threading on a phi with undef inputs happen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83754 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 04:18:15 +00:00
Chris Lattner
1bd8d0a00b there is no need to run mem2reg after jump threading at LTO time now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83753 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 04:17:33 +00:00
Chris Lattner
2c5060dbde fix a bunch of bad formatting, delete the dead
ConstantInt::TheTrueVal/TheFalseVal members.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83752 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 04:03:22 +00:00
Chris Lattner
41fb43bb1e merge two tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83751 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 03:55:30 +00:00
Chris Lattner
d98eb44dde simplify some run lines, convert a test to filecheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83750 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 03:54:21 +00:00
Ted Kremenek
2840c18cf5 Update release notes blurb on the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83749 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 03:10:25 +00:00
Chris Lattner
8c1db67a4c rewrite LCSSA to use SSAUpdate, to only return true if it modifies
the IR, and to implement the FIXME'd optimization.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83748 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 02:53:37 +00:00
Chris Lattner
39b0c3d613 clean up and simplify some code. Don't use setvector when things will be
inserted only once, just use vector.  Don't compute ExitBlocks unless we
need it, change std::sort to array_pod_sort.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83747 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-11 01:07:15 +00:00
Chris Lattner
a09fbf0af0 switch GVN to use SSAUpdater. Besides removing a lot of complexity
from GVN, this also speeds it up, inserts fewer PHI nodes (see the
testcase) and allows it to remove more loads (due to fewer PHI nodes
standing in the way).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83746 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 23:50:30 +00:00
Chris Lattner
0bef562ea2 add a simple helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83745 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 23:41:48 +00:00
Chris Lattner
f5a1fb6b24 add ability for clients of SSAUpdater to find out about the
PHI nodes inserted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83744 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 23:15:24 +00:00
Chris Lattner
aa6aeb91b4 clarify
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83743 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 23:05:42 +00:00
Chris Lattner
813dbd5912 remove dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83742 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 23:04:12 +00:00
Chris Lattner
1a8d4de397 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83741 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 23:00:11 +00:00
Chris Lattner
5fb107287f rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect
what it does.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83740 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 22:41:58 +00:00
Anton Korobeynikov
8f8e9f0830 It seems that OR operation does not affect status reg at all.
Remove impdef of SRW. This fixes PR4779


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83739 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 22:17:47 +00:00
Chris Lattner
558c36729f fix broken link
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83738 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 22:15:25 +00:00
Chris Lattner
f0390dfbc4 final changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83737 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 22:13:38 +00:00
Chris Lattner
220b9eecf5 down to 'major changes'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83736 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 22:02:58 +00:00
Chris Lattner
85c70786f2 more updates
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83735 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 21:40:13 +00:00
Chris Lattner
9b96e80da4 add a link to the GSG for info on how to check out svn trunk
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83734 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 21:37:16 +00:00
Chris Lattner
b91227dc6c x86 uses 5 operands for most memory refs now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83733 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 21:30:55 +00:00
Duncan Sands
2eff6e74be More spelling and grammar tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83728 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 20:06:04 +00:00
Benjamin Kramer
9ddfb948e8 More spelling fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83724 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 19:45:13 +00:00
Duncan Sands
65b0e39acf Spelling fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83722 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 19:30:16 +00:00
Chris Lattner
f435c4139e more tweaks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83721 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 19:26:21 +00:00
Duncan Sands
a637737e49 Remove an inappropriate line in the description of the
clang static analyser.  Decrease duplication in the text.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83720 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 19:16:25 +00:00
Chris Lattner
cfb92fe54e continue decoding chris scribble.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83719 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 19:00:55 +00:00
Chris Lattner
60f034097e remove some dead passes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83717 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 18:40:48 +00:00
Chris Lattner
39c0e67a89 checkpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83716 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 18:33:13 +00:00
Chris Lattner
5a2d87541f fix broken anchors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83715 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 18:26:06 +00:00
Chris Lattner
f9920fabac use a typedef instead of spelling out an insane type. Yay for auto someday.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83707 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 09:09:20 +00:00
Chris Lattner
433a0dbb26 Change jump threading to use the new SSAUpdater class instead of
DemoteRegToStack.  This makes it more efficient (because it isn't
creating a ton of load/stores that are eventually removed by a later
mem2reg), and more slightly more effective (because those load/stores
don't get in the way of threading).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83706 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 09:05:58 +00:00
Chris Lattner
93f3bcf7f3 Implement an efficient and fully general SSA update mechanism that
works on unstructured CFGs.  This implements PR217, our oldest open PR.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83705 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 09:04:27 +00:00
Chris Lattner
f6811274e1 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83704 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 08:27:29 +00:00
Chris Lattner
fc61aeff2c change some static_cast into cast, pointed out by Gabor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83703 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 08:01:27 +00:00
Chris Lattner
ceaa457a9d add a version of PHINode::getIncomingBlock that takes a raw
Use, to complement the version that takes a use_iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83702 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 07:42:42 +00:00
Chris Lattner
2d7f1d24bf random tidying
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 06:22:45 +00:00
Dan Gohman
bcea859fc1 Create a new InstrEmitter class for translating SelectionDAG nodes
into MachineInstrs. This is mostly just moving the code from
ScheduleDAGSDNodesEmit.cpp into a new class. This decouples MachineInstr
emitting from scheduling.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83699 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 01:32:21 +00:00
Dan Gohman
c81b783e27 Make getMachineNode return a MachineSDNode* instead of a generic SDNode*
since it won't do any folding. This will help avoid some inconvenient
casting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83698 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 01:29:16 +00:00
Dan Gohman
4e6f7a0179 Remove a no-longer-necessary #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83697 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 00:36:09 +00:00
Dan Gohman
3731bc026c Replace X86's CanRematLoadWithDispOperand by calling the target-independent
MachineInstr::isInvariantLoad instead, which has the benefit of being
more complete.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83696 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 00:34:18 +00:00
Dan Gohman
5bf7c2a346 Fix a missing initialization of PostRAScheduler's AA member.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83695 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-10 00:15:38 +00:00
Dan Gohman
98976e4dcd The ScheduleDAG framework now requires an AliasAnalysis argument, though
it isn't needed in the ScheduleDAGSDNodes schedulers.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83691 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 23:33:48 +00:00
Dan Gohman
cda49a0b29 Update this test; the code is the same but it gets counted as one
fewer remat.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83690 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 23:31:04 +00:00
Dan Gohman
59ac57153b Mark the LDR instruction with isReMaterializable, as it is rematerializable
when loading from an invariant memory location.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83688 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 23:28:27 +00:00
Dan Gohman
a70dca156f 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83687 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-09 23:27:56 +00:00