Chris Lattner [Sat, 29 Nov 2008 09:15:21 +0000 (09:15 +0000)]
rename some variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60241
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 09:09:48 +0000 (09:09 +0000)]
eliminate a bunch of code in favor of using AliasAnalysis::getModRefInfo.
Put a some code back to handle buggy behavior that GVN expects: it wants
loads to depend on each other, and accesses to depend on their allocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60240
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Sat, 29 Nov 2008 08:52:45 +0000 (08:52 +0000)]
protect against negative values that would exceed allowed bit width
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60239
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 08:51:16 +0000 (08:51 +0000)]
simplify some code and rename some variables. Reduce nesting.
Use getTypeStoreSize instead of ABITypeSize for in-memory size
in a couple places.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60238
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 08:36:39 +0000 (08:36 +0000)]
apparently GCC doesn't believe that I understand C
precedence rules. Pacify it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60237
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Sat, 29 Nov 2008 08:03:35 +0000 (08:03 +0000)]
Typo fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60236
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 03:47:00 +0000 (03:47 +0000)]
Split getDependency into getDependency and getDependencyFrom, the
former does caching, the later doesn't. This dramatically simplifies
the logic in getDependency and getDependencyFrom.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60234
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 29 Nov 2008 03:43:04 +0000 (03:43 +0000)]
Temporarily revert r60195. It's causing an optimized bootstrap of llvm-gcc to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60233
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 03:22:12 +0000 (03:22 +0000)]
Now that DepType is private, we can start cleaning up some of its uses:
Document the Dirty value more precisely, use it for the uninitialized
DepResultTy value. Change reverse mappings to be from an instruction*
instead of DepResultTy, and stop tracking other forms. This makes it more
clear that we only care about the instruction cases.
Eliminate a DepResultTy,bool pair by using Dirty in the local case as well,
shrinking the map and simplifying the code.
This speeds up GVN by ~3% on 403.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60232
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 02:29:27 +0000 (02:29 +0000)]
Introduce and use a new MemDepResult class to hold the results of a memdep
query. This makes it crystal clear what cases can escape from MemDep that
the clients have to handle. This also gives the clients a nice simplified
interface to it that is easy to poke at.
This patch also makes DepResultTy and MemoryDependenceAnalysis::DepType
private, yay.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60231
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 01:43:36 +0000 (01:43 +0000)]
Reimplement the internal abstraction used by MemDep in terms
of a pointer/int pair instead of a manually bitmangled pointer.
This forces clients to think a little more about checking the
appropriate pieces and will be useful for internal
implementation improvements later.
I'm not particularly happy with this. After going through this
I don't think that the clients of memdep should be exposed to
the internal type at all. I'll fix this in a subsequent commit.
This has no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60230
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 01:36:16 +0000 (01:36 +0000)]
Fix sentinels to use correctly 'aligned' pointers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60229
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 29 Nov 2008 01:18:05 +0000 (01:18 +0000)]
Fix spello, add DenseMapInfo specialization for PointerIntPair.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60228
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 23:57:26 +0000 (23:57 +0000)]
fix comment typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60227
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 23:36:15 +0000 (23:36 +0000)]
fix a bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60225
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 23:31:44 +0000 (23:31 +0000)]
add a generic "bitmangled pointer" class, which allows a parameterized
pointer and integer type to be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60224
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 22:51:08 +0000 (22:51 +0000)]
Fix PR3141 by ensuring that MemoryDependenceAnalysis::removeInstruction
properly updates the reverse dependency map when it installs updated
dependencies for instructions that depend on the removed instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60222
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 22:50:08 +0000 (22:50 +0000)]
don't revisit instructions off the beginning of the block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60221
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 22:41:36 +0000 (22:41 +0000)]
comment cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60220
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 22:28:27 +0000 (22:28 +0000)]
more cleanups for MemoryDependenceAnalysis::removeInstruction,
no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60219
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 22:04:47 +0000 (22:04 +0000)]
random cleanups, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60218
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 21:47:19 +0000 (21:47 +0000)]
forward declare CallSite instead of #includ'ing it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60217
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 21:45:17 +0000 (21:45 +0000)]
Run verifyRemoved from removeInstruction when -debug is specified.
This shows the root problem behind PR3141.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60216
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 21:42:09 +0000 (21:42 +0000)]
rename "ping" to "verifyRemoved". I don't know why 'ping' what chosen,
but it doesn't make any sense at all.
Also make the method const, private, and fit in 80 cols while we're at it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60215
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 21:36:43 +0000 (21:36 +0000)]
comment and indentation improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60214
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 21:29:52 +0000 (21:29 +0000)]
simplify some code, remove escaped newline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60213
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 21:16:44 +0000 (21:16 +0000)]
remove mysterious escaped newlines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60211
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 19:54:49 +0000 (19:54 +0000)]
don't call MergeBasicBlockIntoOnlyPred on a block whose only
predecessor is itself. This doesn't make sense, and this is
a dead infinite loop anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60210
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 28 Nov 2008 10:20:03 +0000 (10:20 +0000)]
Add include files needed when building with
gcc 4.4 (due to use of sprintf).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60209
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 28 Nov 2008 09:29:37 +0000 (09:29 +0000)]
Fix build with gcc-4.4: it doesn't like PICStyle
being both a namespace and a variable name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60208
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 01:20:46 +0000 (01:20 +0000)]
rewrite RecursivelyDeleteTriviallyDeadInstructions to use a more efficient
formulation that doesn't require set lookups or scanning a set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60203
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 00:58:15 +0000 (00:58 +0000)]
remove some weirdness that came from the LSR code that has
nothing to do with dead instruction elimination. No tests in
dejagnu depend on this, so I don't know what it was needed for.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60202
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 28 Nov 2008 00:27:14 +0000 (00:27 +0000)]
rewrite a big chunk of how DSE does recursive dead operand
elimination to use more modern infrastructure. Also do a bunch
of small cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60201
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 28 Nov 2008 00:14:11 +0000 (00:14 +0000)]
Scrap some boilerplate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60200
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 28 Nov 2008 00:13:47 +0000 (00:13 +0000)]
Support multiple compilation graph definitions. Not terribly useful, but makes the code more generic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60199
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 28 Nov 2008 00:13:25 +0000 (00:13 +0000)]
Add 'hidden' and 'really_hidden' option properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60198
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Fri, 28 Nov 2008 00:12:09 +0000 (00:12 +0000)]
Documentation: clarify what is meant by 'multiple edges'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60197
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 23:25:44 +0000 (23:25 +0000)]
delete ErasePossiblyDeadInstructionTree, replacing uses of it with
RecursivelyDeleteTriviallyDeadInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60196
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 23:23:35 +0000 (23:23 +0000)]
Simplify LoopStrengthReduce::DeleteTriviallyDeadInstructions by
making it use RecursivelyDeleteTriviallyDeadInstructions to do
the heavy lifting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60195
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 23:18:11 +0000 (23:18 +0000)]
enhance RecursivelyDeleteTriviallyDeadInstructions to make
PHIs dead if they are single-value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60194
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 23:14:34 +0000 (23:14 +0000)]
Enhance RecursivelyDeleteTriviallyDeadInstructions to optionally
return a list of deleted instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60193
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 23:00:20 +0000 (23:00 +0000)]
use continue to reduce indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60192
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 22:57:53 +0000 (22:57 +0000)]
remove doConstantPropagation and dceInstruction, they are just
wrappers around the interesting code and use an obscure iterator
abstraction that dates back many many years.
Move EraseDeadInstructions to Transforms/Utils and name it
RecursivelyDeleteTriviallyDeadInstructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60191
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 22:56:14 +0000 (22:56 +0000)]
simplify code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60190
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 22:46:09 +0000 (22:46 +0000)]
simplify this logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60189
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 27 Nov 2008 22:41:45 +0000 (22:41 +0000)]
Also update the README.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60188
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 27 Nov 2008 22:41:10 +0000 (22:41 +0000)]
Chris prefers icmp/select over udiv!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60187
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 27 Nov 2008 22:12:22 +0000 (22:12 +0000)]
Add a synthetic missed optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60186
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 27 Nov 2008 20:21:08 +0000 (20:21 +0000)]
Add a couple of missed optimizations on integer vectors. Multiply and divide
by 1, as well as multiply by -1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60182
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 19:29:14 +0000 (19:29 +0000)]
defensive patch: if CGP is merging a block with the entry block, make sure
it ends up being the entry block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60180
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 19:25:19 +0000 (19:25 +0000)]
Fix PR3138: if we merge the entry block into another block, make sure to
move the other block back up into the entry position!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60179
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 27 Nov 2008 17:29:52 +0000 (17:29 +0000)]
Silence a warning.
Despite changing the order of evaluation, this doesn't actually change the
meaning of the statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60177
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 27 Nov 2008 16:42:44 +0000 (16:42 +0000)]
fix build on some machines. thanks buildbot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60175
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 27 Nov 2008 16:37:02 +0000 (16:37 +0000)]
fix my previous commit r60064: compare strings instead of pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60174
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 08:56:30 +0000 (08:56 +0000)]
switch InstCombine::visitLoadInst to use
FindAvailableLoadedValue
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60169
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 08:39:18 +0000 (08:39 +0000)]
improve const correctness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60168
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 08:18:12 +0000 (08:18 +0000)]
enhance FindAvailableLoadedValue to make use of AliasAnalysis
if it has it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60167
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 08:10:05 +0000 (08:10 +0000)]
move FindAvailableLoadedValue from JumpThreading to Transforms/Utils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60166
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 27 Nov 2008 08:00:12 +0000 (08:00 +0000)]
Get rid of bogus "control may reach end of non-void function ‘...’ being
inlined" message.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60165
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 07:54:38 +0000 (07:54 +0000)]
simplify this code a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60164
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 07:54:12 +0000 (07:54 +0000)]
Use the new MergeBasicBlockIntoOnlyPred function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60163
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 07:43:12 +0000 (07:43 +0000)]
move MergeBasicBlockIntoOnlyPred to Transforms/Utils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60162
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 27 Nov 2008 07:34:10 +0000 (07:34 +0000)]
XFAil test due to reverting of patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60161
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 07:20:04 +0000 (07:20 +0000)]
rename ThreadBlock to ProcessBlock, since it does other things than
just simple threading.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60157
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 27 Nov 2008 07:18:35 +0000 (07:18 +0000)]
Comment out code that isn't entirely correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60156
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Thu, 27 Nov 2008 06:41:20 +0000 (06:41 +0000)]
Fixed HTML closing tag, cleaned up some spacing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60153
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Thu, 27 Nov 2008 05:58:04 +0000 (05:58 +0000)]
Removing redundant semicolons. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60149
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 27 Nov 2008 05:07:53 +0000 (05:07 +0000)]
Make jump threading substantially more powerful, in the following ways:
1. Make it fold blocks separated by an unconditional branch. This enables
jump threading to see a broader scope.
2. Make jump threading able to eliminate locally redundant loads when they
feed the branch condition of a block. This frequently occurs due to
reg2mem running.
3. Make jump threading able to eliminate *partially redundant* loads when
they feed the branch condition of a block. This is common in code with
lots of loads and stores like C++ code and 255.vortex.
This implements thread-loads.ll and rdar://
6402033.
Per the fixme's, several pieces of this should be moved into Transforms/Utils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60148
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 27 Nov 2008 02:29:25 +0000 (02:29 +0000)]
Eliminate a compile time warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60145
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 27 Nov 2008 01:16:00 +0000 (01:16 +0000)]
Avoid inserting noop's in the middle of a loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60141
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 27 Nov 2008 00:49:46 +0000 (00:49 +0000)]
On x86 favors folding short immediate into some arithmetic operations (e.g. add, and, xor, etc.) because materializing an immediate in a register is expensive in turns of code size.
e.g.
movl 4(%esp), %eax
addl $4, %eax
is 2 bytes shorter than
movl $4, %eax
addl 4(%esp), %eax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60139
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 27 Nov 2008 00:43:21 +0000 (00:43 +0000)]
Add a missing case in visitADD.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60137
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 27 Nov 2008 00:37:06 +0000 (00:37 +0000)]
Add -march=x86.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60135
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Thu, 27 Nov 2008 00:17:25 +0000 (00:17 +0000)]
Add typedef to StringMapEntry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60134
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 26 Nov 2008 22:59:45 +0000 (22:59 +0000)]
Disallow multiple edges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60127
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 26 Nov 2008 22:42:19 +0000 (22:42 +0000)]
Add x86-specific test for add-with-overflow intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60125
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 26 Nov 2008 22:37:40 +0000 (22:37 +0000)]
Generate something sensible for an [SU]ADDO op when the overflow/carry flag is
the conditional for the BRCOND statement. For instance, it will generate:
addl %eax, %ecx
jo LOF
instead of
addl %eax, %ecx
; About 10 instructions to compare the signs of LHS, RHS, and sum.
jl LOF
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60123
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 26 Nov 2008 22:16:44 +0000 (22:16 +0000)]
Turn on my codegen prepare heuristic by default. It doesn't affect
performance in most cases on the Grawp tester, but does speed some
things up (like shootout/hash by 15%). This also doesn't impact
compile time in a noticable way on the Grawp tester.
It also, of course, gets the testcase it was designed for right :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60120
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 26 Nov 2008 19:19:05 +0000 (19:19 +0000)]
Small formatting change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60113
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 26 Nov 2008 19:07:40 +0000 (19:07 +0000)]
Update to explain how ssp and sspreq attributes override each other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60112
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 26 Nov 2008 18:13:11 +0000 (18:13 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60111
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 26 Nov 2008 18:00:00 +0000 (18:00 +0000)]
Cosmetic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60110
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 26 Nov 2008 16:44:30 +0000 (16:44 +0000)]
Check that running the DAG combiner between type
and operation legalization does something useful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60108
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 26 Nov 2008 13:40:08 +0000 (13:40 +0000)]
Describe some more options in the man page.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60105
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Wed, 26 Nov 2008 13:10:39 +0000 (13:10 +0000)]
ignore build dirs and generated files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60104
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 26 Nov 2008 11:19:00 +0000 (11:19 +0000)]
Allow custom lowering of ADDE/ADDC/SUBE/SUBC operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60102
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 26 Nov 2008 10:57:31 +0000 (10:57 +0000)]
Fix the -I option (llvmc -I dir1 -I dir2 didn't work).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60101
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 26 Nov 2008 10:56:56 +0000 (10:56 +0000)]
Refactor Tools.td to remove repetition.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60100
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Wed, 26 Nov 2008 10:55:45 +0000 (10:55 +0000)]
Small fix: the error message was incorrect in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60099
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjiv Gupta [Wed, 26 Nov 2008 10:53:50 +0000 (10:53 +0000)]
Emit declaration for globals and externs.
Custom lower AND, OR, XOR bitwise operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60098
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 26 Nov 2008 06:39:12 +0000 (06:39 +0000)]
Fish kill flag annotations in PUSH instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60095
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 26 Nov 2008 05:50:31 +0000 (05:50 +0000)]
LiveRanges are represented as half-open ranges. Fix the findLiveInMBBs code
and the LiveInterval.h top-level comment and accordingly. This fixes blocks
having spurious live-in registers in boundary cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60092
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 26 Nov 2008 04:59:11 +0000 (04:59 +0000)]
teach the new heuristic how to handle inline asm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60088
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 26 Nov 2008 04:58:14 +0000 (04:58 +0000)]
Disable -loop-index-split for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60087
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Wed, 26 Nov 2008 03:33:13 +0000 (03:33 +0000)]
Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60085
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 26 Nov 2008 03:20:37 +0000 (03:20 +0000)]
Improve ValueAlreadyLiveAtInst with a cheap and dirty, but effective
heuristic: the value is already live at the new memory operation if
it is used by some other instruction in the memop's block. This is
cheap and simple to compute (moreso than full liveness).
This improves the new heuristic even more. For example, it cuts two
out of three new instructions out of 255.vortex:DbmFileInGrpHdr,
which is one of the functions that the heuristic regressed. This
overall eliminates another 40 instructions from 403.gcc and visibly
reduces register pressure in 255.vortex (though this only actually
ends up saving the 2 instructions from the whole program).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60084
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 26 Nov 2008 03:17:27 +0000 (03:17 +0000)]
__fastcall and __stdcall are mingw extensions to gcc for windows. Use the
__attribute__ notation which is supported on more platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60083
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 26 Nov 2008 03:02:41 +0000 (03:02 +0000)]
Start rewroking a subpiece of the profitability heuristic to be
phrased in terms of liveness instead of as a horrible hack. :)
In pratice, this doesn't change the generated code for either
255.vortex or 403.gcc, but it could cause minor code changes in
theory. This is framework for coming changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60082
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhongxing Xu [Wed, 26 Nov 2008 02:57:24 +0000 (02:57 +0000)]
Adjust indent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60081
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 26 Nov 2008 02:54:17 +0000 (02:54 +0000)]
add a long-overdue AllocaInst::isStaticAlloca method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60080
91177308-0d34-0410-b5e6-
96231b3b80d8