Dan Gohman [Wed, 14 Apr 2010 20:05:00 +0000 (20:05 +0000)]
Delete unused arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101275
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 19:53:31 +0000 (19:53 +0000)]
Factor out EH landing pad code into a separate function, and constify
a bunch of stuff to support it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101273
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 19:30:02 +0000 (19:30 +0000)]
Reset the debug location even if the instruction was a terminator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101272
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 18:57:18 +0000 (18:57 +0000)]
Fix a missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101270
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 18:49:17 +0000 (18:49 +0000)]
Refine #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101269
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 18:44:34 +0000 (18:44 +0000)]
Split ISD::NodeType and a few related items out of SelectionDAGNodes.h
into a separate header to allow clients to use them without pulling in
SelectionDAG-specific declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101268
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 18:31:02 +0000 (18:31 +0000)]
Pull utility routines with no SelectionDAG dependence out of
SelectionDAGBuilder. FunctionLoweringInfo isn't an ideal place for
them to live, but it's better than SelectionDAGBuilder for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101267
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 18:24:06 +0000 (18:24 +0000)]
Fix typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101266
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 14 Apr 2010 18:13:29 +0000 (18:13 +0000)]
performance: cache the dereferenced use_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101265
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 17:40:25 +0000 (17:40 +0000)]
Delete an obsolete comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101264
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 17:22:02 +0000 (17:22 +0000)]
Delete an unused function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101263
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 17:13:16 +0000 (17:13 +0000)]
Clear the FunctionLoweringInfo object before doing other things that
don't need it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101262
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 17:11:23 +0000 (17:11 +0000)]
Move this assert out of SelectionDAGISel into FunctionLoweringInfo, and
drop the redundant #ifndef NDEBUG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101261
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 17:09:37 +0000 (17:09 +0000)]
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101260
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 17:05:00 +0000 (17:05 +0000)]
Move the code for initialing the entry block livein set out of
SelectionDAGISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101258
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 17:02:07 +0000 (17:02 +0000)]
Reorgnaize this code to be more tidy and readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101256
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 16:54:39 +0000 (16:54 +0000)]
Trim #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101255
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 16:51:49 +0000 (16:51 +0000)]
Move the code for emitting livein copies out of SelectionDAGISel.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101254
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 14 Apr 2010 16:48:56 +0000 (16:48 +0000)]
performance: cache the dereferenced use_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101253
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 16:32:56 +0000 (16:32 +0000)]
Sink landing-pad marking code out of
SelectionDAGISel::runOnMachineFunction into FunctionLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101252
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 16:30:40 +0000 (16:30 +0000)]
It's not necessary to recompute EB here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101251
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Wed, 14 Apr 2010 16:13:56 +0000 (16:13 +0000)]
performance: cache the dereferenced use_iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101250
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 16:08:56 +0000 (16:08 +0000)]
Add a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101248
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 15:59:02 +0000 (15:59 +0000)]
Fix whitespace, comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101247
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 15:50:02 +0000 (15:50 +0000)]
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101246
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 15:41:50 +0000 (15:41 +0000)]
Use C++, not C++-standard-library-internals-ese.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101245
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 15:38:15 +0000 (15:38 +0000)]
Make SuccIterator's private parts private too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101244
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 15:33:04 +0000 (15:33 +0000)]
Make helper utility members private.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101243
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 14 Apr 2010 13:56:38 +0000 (13:56 +0000)]
EDis: Don't include inttypes.h. We support compilers which don't provide it. It was unused anyways.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101241
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 05:51:59 +0000 (05:51 +0000)]
Enable RTTI again. While this works fine for LLVM, it creates an ABI
incompatibility with some clients covered by the buildbots, such as llvm-gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101237
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 05:35:20 +0000 (05:35 +0000)]
Don't forget cmake!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101234
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 05:30:13 +0000 (05:30 +0000)]
Turn off RTTI for VMCore. Yay!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101233
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 05:03:50 +0000 (05:03 +0000)]
I don't know how, but I managed to goof the revert. Remove function that should
have been removed in r101231.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101232
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 04:51:58 +0000 (04:51 +0000)]
Revert r101213.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101231
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 04:46:11 +0000 (04:46 +0000)]
Remove accidentally committed cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101230
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 04:40:35 +0000 (04:40 +0000)]
Fix 80 column ruler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101229
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 04:40:31 +0000 (04:40 +0000)]
Bugpoint no longer uses exceptions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101228
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 14 Apr 2010 04:40:28 +0000 (04:40 +0000)]
implement mc asmparser support for '.', which gets the
current PC. rdar://
7834775
We now produce an identical .o file compared to the cctools
assembler for something like this:
_f0:
L0:
jmp L1
.long . - L0
L1:
jmp A
.long . - L1
.zerofill __DATA,_bss,A,0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101227
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 04:19:05 +0000 (04:19 +0000)]
Remove tab.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101223
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 03:46:42 +0000 (03:46 +0000)]
Commit testcase for r101213.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101214
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 14 Apr 2010 03:38:11 +0000 (03:38 +0000)]
While DAE can't modify the function signature of an externally visible function,
it can check whether the visible direct callers are passing in parameters to
dead arguments and replace those with undef.
This reinstates r94322 with bugs fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101213
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 02:33:23 +0000 (02:33 +0000)]
Generalize this code to handle Instructions in addition to ConstantExprs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101210
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Apr 2010 02:09:45 +0000 (02:09 +0000)]
Reorder the methods of this class to be a little more organized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101206
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 14 Apr 2010 02:05:29 +0000 (02:05 +0000)]
Fixed another assert exposed by fuzzing. Now, when an encoding error occurs
involing getBFCInvMask() where lsb <= msb does not hold true, the disassembler
just returns false, instead of assert, to indicate disassembly error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101205
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 14 Apr 2010 01:18:28 +0000 (01:18 +0000)]
Clear MachineInstr->MCSymbol maps at the end of a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101202
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Wed, 14 Apr 2010 01:17:37 +0000 (01:17 +0000)]
Fixed an assert() exposed by fuzzing. Now, instead of assert when an invalid
instruction encoding is encountered, we just return a NULL ARMBasicMCBuilder
instance and the client just returns false to indicate disassembly error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101201
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 13 Apr 2010 23:34:11 +0000 (23:34 +0000)]
Fix -Asserts warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101191
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Apr 2010 23:23:09 +0000 (23:23 +0000)]
XFAIL this test for powerpc.
This test relies on iSel lowering dbg_declare intrinsic when CodeGen::OptLevel is None. On PPC side, CodeGen::OptLevel stays to default when -O0 is used on the command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101190
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 13 Apr 2010 22:47:43 +0000 (22:47 +0000)]
Unbreak CMake build by improving the EnhancedDisassembly makefile a
bit (we're not trying to build a shared library yet) and generating
the X86GenEDInfo.inc and ARMGenEDInfo.inc files as necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101188
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Apr 2010 22:13:34 +0000 (22:13 +0000)]
Fast path implicit_def check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101183
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Apr 2010 22:10:03 +0000 (22:10 +0000)]
Add test for post-ra machine licm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101182
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 13 Apr 2010 22:03:22 +0000 (22:03 +0000)]
Handle a v2f64 formal parameter that is split between registers and memory
such that the entire second half is in memory. Radar
7855014.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101181
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 13 Apr 2010 21:36:35 +0000 (21:36 +0000)]
Quick fix for build errors caused by undefined
NULL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101180
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Tue, 13 Apr 2010 21:21:57 +0000 (21:21 +0000)]
Fixed a nasty layering violation in the edis source
code. It used to #include the enhanced disassembly
information for the targets it supported straight
out of lib/Target/{X86,ARM,...} but now it uses a
new interface provided by MCDisassembler, and (so
far) implemented by X86 and ARM.
Also removed hacky #define-controlled initialization
of targets in edis. If clients only want edis to
initialize a limited set of targets, they can set
--enable-targets on the configure command line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101179
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 13 Apr 2010 20:52:50 +0000 (20:52 +0000)]
Add CMake support for 'edis'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101177
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Tue, 13 Apr 2010 20:35:16 +0000 (20:35 +0000)]
Changed getSOImmValRotate()'s hunt retry logic to ignore the low order 6 bits,
instead of 7, because we are only looking for even rotate amount.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101172
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 13 Apr 2010 20:35:04 +0000 (20:35 +0000)]
Do not include types without any definition in pubtypes list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101171
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Apr 2010 20:25:29 +0000 (20:25 +0000)]
Avoid variable shadowing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101170
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Apr 2010 20:21:05 +0000 (20:21 +0000)]
Expand postra machine licm's capability a little more. If an instruction's register operands are all loop invariants, then it's safe to hoist it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101167
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 13 Apr 2010 19:06:14 +0000 (19:06 +0000)]
Teach MachineSinking to handle easy critical edges.
Sometimes it is desirable to sink instructions along a critical edge:
x = ...
if (a && b) ...
else use(x);
The 'a && b' condition creates a critical edge to the else block, but we still
want to sink the computation of x into the block. The else block is dominated by
the parent block, so we are not pushing instructions into new code paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101165
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Apr 2010 18:54:04 +0000 (18:54 +0000)]
Fix test on non-x86 hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101163
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Apr 2010 18:50:27 +0000 (18:50 +0000)]
Re-apply 101075 and fix it properly. Just reuse the debug info of the branch instruction being optimized. There is no need to --I which can deref off start of the BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101162
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Apr 2010 18:41:17 +0000 (18:41 +0000)]
Make the disassembler respect the assembler dialect when printing instructions,
patch by Marius Wachtler!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101160
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 13 Apr 2010 18:37:58 +0000 (18:37 +0000)]
Temporarily revert r101075, it's causing invalid iterator assertions
in a nightly tester.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101158
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 13 Apr 2010 18:16:00 +0000 (18:16 +0000)]
Teach postra machine licm to hoist more obvious invariants, e.g. instructions with no source operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101154
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 17:07:06 +0000 (17:07 +0000)]
Add a few comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101148
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 16:57:55 +0000 (16:57 +0000)]
Eliminate MachineBasicBlock::const_livein_iterator and make
MachineBasicBlock::livein_iterator a const_iterator, because
clients shouldn't ever be using the iterator interface to
mutate the livein set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101147
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 16:56:45 +0000 (16:56 +0000)]
Rename MachineFrameInfo variables to MFI, for consistency with
the rest of CodeGen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101146
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 16:55:37 +0000 (16:55 +0000)]
Move MachineRegisterInfo's isLiveIn and isLiveOut out of line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101145
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 16:53:51 +0000 (16:53 +0000)]
Use MachineBasicBlock::isLiveIn.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101144
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 16:51:39 +0000 (16:51 +0000)]
Delete an unused member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101143
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 16:51:03 +0000 (16:51 +0000)]
Teach ScalarEvolution to simplify smax and umax when it can prove
that one operand is always greater than another.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101142
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 16:49:23 +0000 (16:49 +0000)]
Minor code micro-optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101141
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 13 Apr 2010 16:41:29 +0000 (16:41 +0000)]
Actually... return after the check for invalid input.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101139
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 13 Apr 2010 16:38:06 +0000 (16:38 +0000)]
BumpPtrAllocator::Reset() doesn't need to allocate anything. (Thanks, Jakob)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101138
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 13 Apr 2010 15:01:26 +0000 (15:01 +0000)]
Update unittest for allocator laziness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101131
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 13 Apr 2010 14:41:51 +0000 (14:41 +0000)]
Let BumpPtrAllocator lazily allocate the first slab.
We have some code in llvm and clang where a BumpPtrAllocator is declared in a
class but never used in the common case. Stop wasting memory there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101130
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 13 Apr 2010 08:33:09 +0000 (08:33 +0000)]
Remove SCCVN from the CMake build system.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101125
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Apr 2010 06:37:00 +0000 (06:37 +0000)]
checkpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101118
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 13 Apr 2010 05:24:08 +0000 (05:24 +0000)]
SCCVN, we hardly knew ye!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101117
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Apr 2010 04:35:39 +0000 (04:35 +0000)]
Fix PR6826: GraphWriter delete the generated file before "dotty" load it,
patch by 'ether'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101116
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 13 Apr 2010 02:11:48 +0000 (02:11 +0000)]
Replace r101053 with a fix for getSOImmValRotate() so that it will correctly
recognize all the valid rotated immediates. This fixes the disassembler
issue and will also help codegen for some unusual constant values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101114
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 13 Apr 2010 01:46:36 +0000 (01:46 +0000)]
Teach IndVarSimplify how to eliminate remainder operators where the
numerator is an induction variable. For example, with code like this:
for (i=0;i<n;++i)
x[i%n] = 0;
IndVarSimplify will now recognize that i is always less than n inside
the loop, and eliminate the remainder.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101113
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 13 Apr 2010 01:39:07 +0000 (01:39 +0000)]
VMCore: Add Type::getIntN[Ptr]Ty, which are the obvious generic forms of
Type::getInt{1,8,...}[Ptr]Ty, so code can consistently use the methods on Type
without occasionally needed to call IntegerType::get.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101111
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 13 Apr 2010 01:38:57 +0000 (01:38 +0000)]
IRBuilder: Add Create{Shl,LShr,And,Or,Xor} methods from uin64_t and APInt constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101110
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 13 Apr 2010 00:36:43 +0000 (00:36 +0000)]
add llvm codegen support for -ffunction-sections and -fdata-sections,
patch by Sylvere Teissier!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101106
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 12 Apr 2010 23:55:28 +0000 (23:55 +0000)]
Build system fix to make llvm-mc properly build
after edis. Really, there ought to be some
mechanism to ensure that PARALLEL_DIRS get built
after DIRS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101095
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 12 Apr 2010 23:08:18 +0000 (23:08 +0000)]
Micro-optimize a few hot spots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101086
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 12 Apr 2010 23:07:17 +0000 (23:07 +0000)]
Use .set expression for x86 pic jump table reference to reduce assembly relocation. rdar://
7738756
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101085
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 12 Apr 2010 23:03:26 +0000 (23:03 +0000)]
Add fast paths to ScalarEvolution::getSizeOf and getOffsetOf, as
they're used a lot by getNodeForGEP, which can be called a lot.
This speeds up -iv-users by around 15% on several testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101083
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 12 Apr 2010 22:43:21 +0000 (22:43 +0000)]
Third time's a charm...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101081
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 12 Apr 2010 22:40:37 +0000 (22:40 +0000)]
Genericize the label test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101079
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 12 Apr 2010 22:25:42 +0000 (22:25 +0000)]
Correct test to test what I mean it to test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101077
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Mon, 12 Apr 2010 22:19:57 +0000 (22:19 +0000)]
Micro-optimization:
If we have this situation:
jCC L1
jmp L2
L1:
...
L2:
...
We can get a small performance boost by emitting this instead:
jnCC L2
L1:
...
L2:
...
This testcase shows an example of this:
float func(float x, float y) {
double product = (double)x * y;
if (product == 0.0)
return product;
return product - 1.0;
}
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101075
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 12 Apr 2010 22:12:29 +0000 (22:12 +0000)]
Simplify this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101074
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 12 Apr 2010 21:55:49 +0000 (21:55 +0000)]
Build system fixes. llvm-mc depends on
libEnhancedDisassembly, so we now build the
static library in all cases (although the shared
library is only built when requested/possible).
Also, fixed a bug where edis wasn't properly
initializing the targets it uses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101072
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 12 Apr 2010 21:13:43 +0000 (21:13 +0000)]
Suppress LinearFunctionTestReplace when the computed backedge-taken
expression is a UDiv and it doesn't appear that the UDiv came from
the user's source.
ScalarEvolution has recently figured out how to compute a tripcount
expression for the inner loop in
SingleSource/Benchmarks/Shootout/sieve.c, using a udiv. Emitting a
udiv instruction dramatically slows down the enclosing loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101068
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 12 Apr 2010 20:23:08 +0000 (20:23 +0000)]
Bug fix: made the enhanced disassembler's link
flags work properly when EDIS_VERSION is defined
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101063
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 12 Apr 2010 20:21:56 +0000 (20:21 +0000)]
Bug fix: included System/Types.h instead of
inttypes.h to allow building on Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101062
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Callanan [Mon, 12 Apr 2010 19:43:00 +0000 (19:43 +0000)]
Second try at integrating the edis tester. This
time I use the LIBS variable, which is not subject
to a %.a -> -l% transformation, to link llvm-mc
against libEnhancedDisassembly.
llvm-mc -edis works the same as llvm-mc
-disassemble, but outputs tokens and operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101058
91177308-0d34-0410-b5e6-
96231b3b80d8