Chris Lattner [Wed, 12 Jan 2011 01:52:23 +0000 (01:52 +0000)]
revert r123146 which disabled code that wasn't the root cause
of the bootstrap miscompare issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123299
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 12 Jan 2011 01:43:46 +0000 (01:43 +0000)]
revert r123149, reenabling an improvement to memcpyopt that wasn't
the source of the bootstrap problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123298
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Wed, 12 Jan 2011 01:42:42 +0000 (01:42 +0000)]
Prefer llvm_unreachable to assert(0)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123297
91177308-0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Wed, 12 Jan 2011 00:19:25 +0000 (00:19 +0000)]
1. Support ELF pcrel relocations for movw/movt:
R_ARM_MOVT_PREL and R_ARM_MOVW_PREL_NC.
2. Fix minor bug in ARMAsmPrinter - treat bitfield flag as a bitfield, not an enum.
3. Add support for 3 new elf section types (no-ops)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123294
91177308-0d34-0410-b5e6-
96231b3b80d8
Jason W Kim [Tue, 11 Jan 2011 23:53:41 +0000 (23:53 +0000)]
Workaround for bug 8721.
.s Test added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123292
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 23:20:33 +0000 (23:20 +0000)]
The world is not ready for LiveDebugVariables yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123290
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 22:56:41 +0000 (22:56 +0000)]
Remove the PR8954 workaround.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123288
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 22:54:38 +0000 (22:54 +0000)]
Fix a non-deterministic loop in llvm::MergeBlockIntoPredecessor.
DT->changeImmediateDominator() trivially ignores identity updates, so there is
really no need for the uniqueing provided by SmallPtrSet.
I expect this to fix PR8954.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123286
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 22:45:28 +0000 (22:45 +0000)]
Enable LiveDebugVariables by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123282
91177308-0d34-0410-b5e6-
96231b3b80d8
Venkatraman Govindaraju [Tue, 11 Jan 2011 22:38:28 +0000 (22:38 +0000)]
SPARC backend: correct ICC/FCC uses for ADDX and SELECT_CC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123281
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Tue, 11 Jan 2011 22:14:42 +0000 (22:14 +0000)]
Dial back the speculative fix for PR8954 a bit, so that we only recompute dominators
once at the beginning of GVN instead of once per iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123278
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 22:11:16 +0000 (22:11 +0000)]
Don't insert DBG_VALUE instructions after the first terminator.
For one, MachineBasicBlock::getFirstTerminator() doesn't understand what is
happening, and it also makes sense to have all control flow run through the
DBG_VALUE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123277
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 11 Jan 2011 21:46:47 +0000 (21:46 +0000)]
Clean up ARM subtarget code by using Triple ADT.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123276
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 11 Jan 2011 21:42:10 +0000 (21:42 +0000)]
Appropriately truncate debug info range in dwarf output.
This is not yet completely enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123274
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 21:23:09 +0000 (21:23 +0000)]
Put the Dominator improvements back in. They were not the cause of bootstrap miscomparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123273
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Tue, 11 Jan 2011 20:23:34 +0000 (20:23 +0000)]
Attempt to fix the bootstrap buildbot. Rafael says this works for him on x86-64 Linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123270
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 19:26:30 +0000 (19:26 +0000)]
Speculatively revert the recent improvements to Dominators.h in an attempt to track down the gcc bootstrap miscompare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123254
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Jan 2011 19:06:29 +0000 (19:06 +0000)]
McARM: Fill in GetMnemonicAcceptInfo().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123253
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Jan 2011 19:06:26 +0000 (19:06 +0000)]
McARM: Write a silly Python script to compute some hard coded info from the
generated ARM match table, which is substantially more efficient than dealing
with tblgen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123252
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 11 Jan 2011 18:26:37 +0000 (18:26 +0000)]
Remove dead variable, const-ref-ize an APInt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123248
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 18:14:50 +0000 (18:14 +0000)]
this pass claims to preserve scev, make sure to tell it about deletions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123247
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Tue, 11 Jan 2011 17:56:41 +0000 (17:56 +0000)]
Fix a comment: We now have intrinsics for vcvtr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123246
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 17:11:59 +0000 (17:11 +0000)]
some comment improvements.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123243
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 17:04:55 +0000 (17:04 +0000)]
Fix PR8946, a missing reg/reg form of movdqu.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123242
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Jan 2011 15:59:53 +0000 (15:59 +0000)]
McARM: Sketch some logic for determining when to add carry set and predication code operands based on the "canonical mnemonic".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123239
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 11 Jan 2011 15:59:50 +0000 (15:59 +0000)]
McARM: Add more hard coded logic to SplitMnemonicAndCC to also split out the
carry setting flag from the mnemonic.
Note that this currently involves me disabling a number of working cases in
arm_instructions.s, this is a hopefully short term evil which will be rapidly
fixed (and greatly surpassed), assuming my current approach flies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123238
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Tue, 11 Jan 2011 15:07:38 +0000 (15:07 +0000)]
FixedNumOperandTraits and VariadicOperandTraits assumed that, given a
"this" pointer for any subclass of User, you could static_cast it to
User* and then reinterpret_cast that to Use* to get the end of the
operand list. This isn't a safe assumption in general, because the
static_cast might adjust the "this" pointer. Fixed by having these
OperandTraits classes take an extra template parameter, which is the
subclass of User. This is groundwork for PR889.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123235
91177308-0d34-0410-b5e6-
96231b3b80d8
Frits van Bommel [Tue, 11 Jan 2011 12:52:11 +0000 (12:52 +0000)]
Factor the actual simplification out of SimplifyIndirectBrOnSelect and into a new helper function so it can be reused in e.g. an upcoming SimplifySwitchOnSelect.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123234
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 11 Jan 2011 12:31:54 +0000 (12:31 +0000)]
Add to the CMake build some options and platform tests supported by
the traditional build.
Patch by arrowdodger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123233
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 11 Jan 2011 12:31:34 +0000 (12:31 +0000)]
Made llvm_replace_compiler_option more robust. Use it on
llvm_process_sources.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123232
91177308-0d34-0410-b5e6-
96231b3b80d8
Kalle Raiskila [Tue, 11 Jan 2011 11:27:56 +0000 (11:27 +0000)]
Fix a thinko in 123226 that caused test failures on "other" platforms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123229
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Jan 2011 09:20:44 +0000 (09:20 +0000)]
Revert the testcase from the previous reverted commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123227
91177308-0d34-0410-b5e6-
96231b3b80d8
Kalle Raiskila [Tue, 11 Jan 2011 09:07:54 +0000 (09:07 +0000)]
Add a "nop filler" pass to SPU.
Filling no-ops is done just before emitting of assembly,
when the instruction stream is final. No-ops are inserted
to align the instructions so the dual-issue of the pipeline
is utilized. This speeds up generated code with a minimum of
1% on a select set of algorithms.
This pass may be redundant if the instruction scheduler and
all subsequent passes that modify the instruction stream
(prolog+epilog inserter, register scavenger, are there others?)
are made aware of the instruction alignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123226
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Jan 2011 09:02:09 +0000 (09:02 +0000)]
Temporarily revert 123133, it's causing some regressions and I'm trying
to get a testcase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123225
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 08:19:16 +0000 (08:19 +0000)]
update memdep when an instruction is deleted. This code isn't
actually reached in the testcase in PR8954, but it's safe and good
practice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123224
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 08:16:49 +0000 (08:16 +0000)]
when MergeBlockIntoPredecessor merges two blocks, update MemDep if it
is floating around in the ether.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123223
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 08:13:40 +0000 (08:13 +0000)]
Fix FoldSingleEntryPHINodes to update memdep and AA when it deletes
phi nodes. It is called from MergeBlockIntoPredecessor which is
called from GVN, which claims to preserve these.
I'm skeptical that this is the actual problem behind PR8954, but
this is a stab in the right direction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123222
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 08:00:40 +0000 (08:00 +0000)]
random cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123221
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 07:50:07 +0000 (07:50 +0000)]
merge tests into one crash.ll test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123220
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 07:47:59 +0000 (07:47 +0000)]
remove a bogus assertion: the latch block of a loop is not
neccesarily an uncond branch to the header. This fixes
PR8955 (the assertion tripping).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123219
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 11 Jan 2011 06:44:41 +0000 (06:44 +0000)]
the GEP faq says that only inbounds geps are guaranteed to not overflow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123218
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 04:05:39 +0000 (04:05 +0000)]
Revert r123207: "Turn on memdep's verifyRemoved() in an attempt to smoke out the cause of our gcc bootstrap miscompare."
It didn't.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123215
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 11 Jan 2011 01:21:55 +0000 (01:21 +0000)]
Support/Path: Deprecate PathV1::isDirectory and replace all uses with PathV2::is_directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123209
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 11 Jan 2011 01:18:03 +0000 (01:18 +0000)]
Turn on memdep's verifyRemoved() in an attempt to smoke out the cause of our gcc bootstrap miscompare.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123207
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 11 Jan 2011 01:07:24 +0000 (01:07 +0000)]
Teach constant folding to perform conversions from constant floating
point values to their integer representation through the SSE intrinsic
calls. This is the last part of a README.txt entry for which I have real
world examples.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123206
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 11 Jan 2011 01:07:20 +0000 (01:07 +0000)]
FileCheck-ize a test, and move a no-longer calling test case to another
file and make it actually test something...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123205
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 11 Jan 2011 00:36:45 +0000 (00:36 +0000)]
Fix a random missed optimization by making InstCombine more aggressive when determining which bits are demanded by
a comparison against a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123203
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Jan 2011 00:36:08 +0000 (00:36 +0000)]
Move ExpandAtomic into the integer expansion routines - it's only used there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123202
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 11 Jan 2011 00:16:04 +0000 (00:16 +0000)]
Even if we don't have 7 bytes of stack space we may need to save and
restore the stack pointer from the frame pointer on thumbv6.
Fixes rdar://
8819685
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123196
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 10 Jan 2011 23:10:59 +0000 (23:10 +0000)]
Expand on the safeness of restoring the sp from the fp a bit more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123193
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Mon, 10 Jan 2011 21:53:07 +0000 (21:53 +0000)]
Fix PR 8916 (qv for analysis), at least the immediate problem.
There's an inherent tension in DAGCombine between assuming
that things will be put in canonical form, and the Depth
mechanism that disables transformations when recursion gets
too deep. It would not surprise me if there's a lot of little
bugs like this one waiting to be discovered. The mechanism
seems fragile and I'd suggest looking at it from a design viewpoint.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123191
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Jan 2011 21:01:17 +0000 (21:01 +0000)]
+0.0 vs -0.0 differences can be handled by looking at the user of the
operation in some cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123190
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 10 Jan 2011 21:01:03 +0000 (21:01 +0000)]
McARM: Flush out hard coded known non-predicated mnemonic list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123189
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 10 Jan 2011 15:26:39 +0000 (15:26 +0000)]
McARM: Mark some T2 ...s instructions as codegen only, they aren't real
instructions but are restricted pseudo forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123177
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 10 Jan 2011 15:26:35 +0000 (15:26 +0000)]
ARM/MC: Mark several '...S' instructions as codegen only, they aren't real
instructions but are restricted pseudo forms.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123176
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 10 Jan 2011 15:26:21 +0000 (15:26 +0000)]
MC/ARM/AsmParser: Minor nitty fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123175
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 10 Jan 2011 15:26:11 +0000 (15:26 +0000)]
MC/AsmMatcher: Fix indirect 80-col viola.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123174
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 10 Jan 2011 12:56:18 +0000 (12:56 +0000)]
Fix merge fallout
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123172
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 10 Jan 2011 12:39:23 +0000 (12:39 +0000)]
Update CMake stuff
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123171
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 10 Jan 2011 12:39:04 +0000 (12:39 +0000)]
Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123170
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Mon, 10 Jan 2011 12:24:52 +0000 (12:24 +0000)]
MC/ARM/AsmParser: Split out SplitMnemonicAndCC().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123169
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 10 Jan 2011 09:02:58 +0000 (09:02 +0000)]
Cleanup some of the constant folding code to consistently test intrinsic
IDs when available rather than using a mixture of IDs and textual name
comparisons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123165
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Jan 2011 07:51:31 +0000 (07:51 +0000)]
fit in 80 cols and use MBB::isSuccessor instead of a hand
rolled std::find.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123164
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 10 Jan 2011 07:19:37 +0000 (07:19 +0000)]
Teach instcombine about the rest of the SSE and SSE2 conversion
intrinsics element dependencies. Reviewed by Nick.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123161
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 10 Jan 2011 02:58:51 +0000 (02:58 +0000)]
Simplify a bunch of isVirtualRegister() and isPhysicalRegister() logic.
These functions not longer assert when passed 0, but simply return false instead.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123155
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 10 Jan 2011 02:53:58 +0000 (02:53 +0000)]
Fold two related tests into the newly FileCheck-ized test, migrating
them to FileCheck as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123154
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 10 Jan 2011 02:53:54 +0000 (02:53 +0000)]
Clean up and FileCheck-ize a test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123153
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 10 Jan 2011 02:34:40 +0000 (02:34 +0000)]
Fix Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123152
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 10 Jan 2011 02:34:23 +0000 (02:34 +0000)]
Support/Path: Deprecate PathV1::exists and replace all uses with PathV2::fs::exists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123151
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Jan 2011 02:34:11 +0000 (02:34 +0000)]
another random stab in the dark trying to fix llvm-gcc-i386-linux-selfhost
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123149
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Jan 2011 02:33:34 +0000 (02:33 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123148
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Jan 2011 00:47:34 +0000 (00:47 +0000)]
another (more) aggressive attempt to bring llvm-gcc-i386-linux-selfhost
back to life.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123146
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 10 Jan 2011 00:33:01 +0000 (00:33 +0000)]
expand on a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123145
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 23:52:48 +0000 (23:52 +0000)]
temporarily disable memset formation from memsets in an effort to restore buildbot stability.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123144
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 23:52:31 +0000 (23:52 +0000)]
add a testcase I missed in previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123143
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 23:48:41 +0000 (23:48 +0000)]
typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123142
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 23:42:22 +0000 (23:42 +0000)]
xref a PR #
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123141
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 9 Jan 2011 23:20:48 +0000 (23:20 +0000)]
Remove TargetRegisterInfo::NoRegister.
Fix the TargetRegisterInfo::NoRegister places where someone preferred
typing 'TargetRegisterInfo::NoRegister' instead of typing '0'.
Note that TableGen is already emitting xx::NoRegister in xxGenRegisterNames.inc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123140
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 23:02:10 +0000 (23:02 +0000)]
add a fixme: ir isn't expressive enough.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123139
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 22:58:47 +0000 (22:58 +0000)]
Step #4 in improving trip count analysis: HowFarToZero can analyze
NUW AddRec's much more aggressively. We now get a trip count
for @test2 in nsw.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123138
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 9 Jan 2011 22:42:48 +0000 (22:42 +0000)]
Change virtual register numbering to make more space for physical registers.
The numbering plan is now:
0 NoRegister.
[1;2^30) Physical registers.
[2^30;2^31) Stack slots.
[2^31;2^32) Virtual registers. (With -1u and -2u used by DenseMapInfo.)
Each segment is filled from the left, so any mistaken interpretation should
quickly cause crashes.
FirstVirtualRegister has been removed. TargetRegisterInfo provides predicates
conversion functions that should be used instead of interpreting register
numbers manually.
It is now legal to pass NoRegister to isPhysicalRegister() and
isVirtualRegister(). The result is false in both cases.
It is quite rare to represent stack slots in this way, so isPhysicalRegister()
and isVirtualRegister() require that isStackSlot() be checked first if it can
possibly return true. This allows a very fast implementation of the common
predicates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123137
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 22:39:48 +0000 (22:39 +0000)]
rearrange some code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123136
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jan 2011 22:36:18 +0000 (22:36 +0000)]
Add a note about the inability to model FP -> int conversions which
perform rounding other than truncation in the IR. Common C code for this
turns into really an LLVM intrinsic call that blocks a lot of further
optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123135
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 22:31:26 +0000 (22:31 +0000)]
Step #3 to improving trip count analysis: If we fold
a + {b,+,stride} into {a+b,+,stride} (because a is LIV),
then the resultant AddRec is NUW/NSW if the client says it
is.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123133
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 22:26:35 +0000 (22:26 +0000)]
Step #2 to improve trip count analysis for loops like this:
void f(int* begin, int* end) { std::fill(begin, end, 0); }
which turns into a != exit expression where one pointer is
strided and (thanks to step #1) known to not overflow, and
the other is loop invariant.
The observation here is that, though the IV is strided by
4 in this case, that the IV *has* to become equal to the
end value. It cannot "miss" the end value by stepping over
it, because if it did, the strided IV expression would
eventually wrap around.
Handle this by turning A != B into "A-B != 0" where the A-B
part is known to be NUW.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123131
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 9 Jan 2011 21:58:20 +0000 (21:58 +0000)]
Remove MachineRegisterInfo::getLastVirtReg(), it was giving wrong results
when no virtual registers have been allocated.
It was only used to resize IndexedMaps, so provide an IndexedMap::resize()
method such that
Map.grow(MRI.getLastVirtReg());
can be replaced with the simpler
Map.resize(MRI.getNumVirtRegs());
This works correctly when no virtuals are allocated, and it bypasses the to/from
index conversions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123130
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 21:31:39 +0000 (21:31 +0000)]
sort this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123129
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 9 Jan 2011 21:17:37 +0000 (21:17 +0000)]
Teach TargetRegisterInfo how to cram stack slot indexes in with the virtual and
physical register numbers.
This makes the hack used in LiveInterval official, and lets LiveInterval be
oblivious of stack slots.
The isPhysicalRegister() and isVirtualRegister() predicates don't know about
this, so when a variable may contain a stack slot, isStackSlot() should always
be tested first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123128
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jan 2011 21:00:19 +0000 (21:00 +0000)]
Add a note about a missed FP optimization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123126
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 9 Jan 2011 19:45:45 +0000 (19:45 +0000)]
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123125
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 9 Jan 2011 19:26:10 +0000 (19:26 +0000)]
fix a few old bugs (found by inspection) where we would zap instructions
without informing memdep. This could cause nondeterminstic weirdness
based on where instructions happen to get allocated, and will hopefully
breath some life into some broken testers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123124
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sun, 9 Jan 2011 18:58:33 +0000 (18:58 +0000)]
Add a forgotten VireReg2IndexFunctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123123
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 9 Jan 2011 17:38:31 +0000 (17:38 +0000)]
Apply -fPIC to C sources too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123122
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 9 Jan 2011 16:00:11 +0000 (16:00 +0000)]
Instcombine: Fix pattern where the sext did not dominate the icmp using it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123121
91177308-0d34-0410-b5e6-
96231b3b80d8
Tobias Grosser [Sun, 9 Jan 2011 16:00:09 +0000 (16:00 +0000)]
DominatorTree->print() now prints the status of the DFSNumbers correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123120
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 9 Jan 2011 14:34:39 +0000 (14:34 +0000)]
Rewrite handling of LLVM_ENABLE_PIC. It was being processed after
config.h was generated, so it had no effect on it.
Thanks to arrowdodger for pointing out this and a tentative patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123119
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 9 Jan 2011 12:35:16 +0000 (12:35 +0000)]
LoopInstSimplify preserves LoopSimplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123117
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 9 Jan 2011 11:29:57 +0000 (11:29 +0000)]
Another missed memset in std::vector initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123116
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 9 Jan 2011 10:54:21 +0000 (10:54 +0000)]
Eliminate some extra hash table lookups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123115
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Sun, 9 Jan 2011 10:32:30 +0000 (10:32 +0000)]
Add an informative comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123114
91177308-0d34-0410-b5e6-
96231b3b80d8