Bill Wendling [Mon, 14 Dec 2009 06:51:19 +0000 (06:51 +0000)]
Whitespace changes, comment clarification. No functional changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91274
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 14 Dec 2009 06:49:42 +0000 (06:49 +0000)]
Moved spill weight calculation out of SimpleRegisterCoalescing and into its own pass: CalculateSpillWeights.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91273
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 14 Dec 2009 05:11:02 +0000 (05:11 +0000)]
revert r91184, because it causes a crash on a .bc file I just
sent to Bob.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91268
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 14 Dec 2009 04:22:04 +0000 (04:22 +0000)]
atomic binary operations up to 32-bits wide.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91260
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Mon, 14 Dec 2009 04:06:38 +0000 (04:06 +0000)]
Add a test for the 'init' option property.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91259
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Sun, 13 Dec 2009 20:30:32 +0000 (20:30 +0000)]
Reinstate r91208 to fix available_externally linkage for globals, with
nlewycky's fix to add -rdynamic so the JIT can look symbols up in Linux builds
of the JITTests binary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91250
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Sun, 13 Dec 2009 08:59:40 +0000 (08:59 +0000)]
Using _MSC_VER there was wrong, better just use the already existing ifdefs for
x86 CPU detection for the X86 getHostCPUName too, and create a simple
getHostCPUName that returns "generic" for all else.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91240
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 13 Dec 2009 07:04:45 +0000 (07:04 +0000)]
Don't leave pointers uninitialized in the default constructor. GCC complains
about the potential use of these uninitialized members under certain conditions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91239
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 13 Dec 2009 01:00:59 +0000 (01:00 +0000)]
Fix weird typo which leads to unallocated memory access for nodes with 4 results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91233
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sun, 13 Dec 2009 01:00:32 +0000 (01:00 +0000)]
Do not allow uninitialize access during debug printing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91232
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 12 Dec 2009 23:23:43 +0000 (23:23 +0000)]
More info on this transformation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91230
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 12 Dec 2009 21:41:48 +0000 (21:41 +0000)]
Remove some stuff that's already implemented. Also, remove the note about
merging x >u 5 and x <s 20 because it's impossible to implement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91228
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Sat, 12 Dec 2009 21:17:54 +0000 (21:17 +0000)]
Update install-clang target for clang-cc removal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91226
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 12 Dec 2009 20:03:14 +0000 (20:03 +0000)]
Disable r91104 for x86. It causes partial register stall which pessimize code in 32-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91223
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Sat, 12 Dec 2009 18:55:37 +0000 (18:55 +0000)]
Implement variable-width shifts.
No testcase yet - it seems we're exposing generic codegen bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91221
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 12 Dec 2009 18:55:26 +0000 (18:55 +0000)]
Add comment about potential partial register stall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91220
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 12 Dec 2009 18:51:56 +0000 (18:51 +0000)]
Fix an obvious bug. No test case since LEA16r is not being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91219
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Sat, 12 Dec 2009 12:42:31 +0000 (12:42 +0000)]
Enable CPU detection when using MS VS 2k8 too.
MSVS2k8 doesn't define __i386__, hence all the CPU detection code was disabled.
Enable it by looking for _MSC_VER.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91217
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 12 Dec 2009 09:25:50 +0000 (09:25 +0000)]
Fix some CHECK lines which were ignored by accident.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91214
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Sat, 12 Dec 2009 06:18:46 +0000 (06:18 +0000)]
Revert r91208. Something on Linux prevents the JIT from looking up a symbol
defined in the test, and I don't have time tonight to figure it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91209
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Sat, 12 Dec 2009 05:58:14 +0000 (05:58 +0000)]
Fix available_externally linkage for globals. It's probably still not
supported by emitGlobals, but I don't have a test case for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91208
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeffrey Yasskin [Sat, 12 Dec 2009 04:08:32 +0000 (04:08 +0000)]
Make it easier to use the llvm_unreachable and DEBUG macros without "using
namespace llvm" by qualifying their implementations with ::llvm::.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91206
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 12 Dec 2009 01:40:06 +0000 (01:40 +0000)]
Framework for atomic binary operations. The emitter for the pseudo instructions
just issues an error for the moment. The front end won't yet generate these
intrinsics for ARM, so this is behind the scenes until complete.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91200
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Fri, 11 Dec 2009 23:47:40 +0000 (23:47 +0000)]
Revise scalar replacement to be more flexible about handle bitcasts and GEPs.
While scanning through the uses of an alloca, keep track of the current offset
relative to the start of the alloca, and check memory references to see if
the offset & size correspond to a component within the alloca. This has the
nice benefit of unifying much of the code from isSafeUseOfAllocation,
isSafeElementUse, and isSafeUseOfBitCastedAllocation. The code to rewrite
the uses of a promoted alloca, after it is determined to be safe, is
reorganized in the same way.
Also, when rewriting GEP instructions, mark them as "in-bounds" since all the
indices are known to be safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91184
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Dec 2009 23:26:08 +0000 (23:26 +0000)]
Delete an unnecessary line. The VTSDNode on a SIGN_EXTEND_REG is never
a vector type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91181
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 11 Dec 2009 23:01:29 +0000 (23:01 +0000)]
Lower setcc branchless, if this is profitable.
Based on the patch by Brian Lucas!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91175
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 11 Dec 2009 21:47:36 +0000 (21:47 +0000)]
Don't try to move a MBB into the fall-through position if it's a landing pad or
branches only to a landing pad. Without this check, the compiler would go into
an infinite loop because the branch to a landing pad is an "abnormal" edge which
wasn't being taken into account.
This is the meat of that fix:
if (!PrevBB.canFallThrough() && !MBB->BranchesToLandingPad(MBB)) {
The other stuff is simplification of the "branches to a landing pad" code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91161
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 11 Dec 2009 21:37:07 +0000 (21:37 +0000)]
Construct CompileUnits lazily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91159
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Dec 2009 21:31:27 +0000 (21:31 +0000)]
Implement vector widening, splitting, and scalarizing for SIGN_EXTEND_INREG.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91158
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Dec 2009 20:29:53 +0000 (20:29 +0000)]
memory barrier instructions by definition have side effects. This prevents the post-RA scheduler from moving them around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91150
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Dec 2009 20:09:21 +0000 (20:09 +0000)]
Change this to the correct PR number.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91148
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Dec 2009 20:05:23 +0000 (20:05 +0000)]
Make getUniqueExitBlocks's precondition assert more precise, to
avoid spurious failures. This fixes PR5758.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91147
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 11 Dec 2009 19:50:50 +0000 (19:50 +0000)]
Fix the result type of SELECT nodes lowered from Select instructions with
aggregate return values. This fixes PR5754.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91145
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Fri, 11 Dec 2009 19:39:55 +0000 (19:39 +0000)]
Honour setHasCalls() set from isel.
This is used in some weird cases like general dynamic TLS model.
This fixes PR5723
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91144
91177308-0d34-0410-b5e6-
96231b3b80d8
Johnny Chen [Fri, 11 Dec 2009 19:37:26 +0000 (19:37 +0000)]
Store Register Exclusive should leave the source register Inst{3-0} unspecified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91143
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Dec 2009 18:52:41 +0000 (18:52 +0000)]
Update properties.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91140
91177308-0d34-0410-b5e6-
96231b3b80d8
Gabor Greif [Fri, 11 Dec 2009 15:30:07 +0000 (15:30 +0000)]
Simplify this class by removing the result cache.
This change removes the DefaultConstructible
and CopyAssignable constraints on the template
parameter T (the first one).
The second template parameter (R) is defaulted to be
identical to the first and controls the result type.
By specifying it to be (const T&) additionally the
CopyConstructible constraint on T can be removed.
This allows to use StringSwitch e.g. for llvm::Constant
instances.
Regarding the other review feedback regarding performance
because of taking pointers, this class should be completely
optimizable like before, since all methods are inline and
the pointer dereferencing and result value caching should be
possible behind the scenes by the "as-if" rule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91123
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 11 Dec 2009 10:43:41 +0000 (10:43 +0000)]
Revert part of r91101 which was causing an infinite loop in the self-hosting
build bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91113
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 11 Dec 2009 08:36:17 +0000 (08:36 +0000)]
Add utility method for determining whether a function argument
has the 'nest' attribute.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91109
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 11 Dec 2009 06:02:21 +0000 (06:02 +0000)]
Tests for 91103 and 91104.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91105
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 11 Dec 2009 06:01:48 +0000 (06:01 +0000)]
Add support to 3-addressify 16-bit instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91104
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 11 Dec 2009 06:01:00 +0000 (06:01 +0000)]
Coalesce insert_subreg undef, x first to avoid phase ordering issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91103
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 11 Dec 2009 03:14:18 +0000 (03:14 +0000)]
Address comments on last patch:
- Loosen the restrictions when checking of it branches to a landing pad.
- Make the loop more efficient by checking the '.insert' return value.
- Do cheaper checks first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91101
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 11 Dec 2009 01:49:14 +0000 (01:49 +0000)]
A machine basic block may end in an unconditional branch, however it may have
more than one successor. Normally, these extra successors are dead. However,
some of them may branch to exception handling landing pads. If we remove those
successors, then the landing pads could go away if all predecessors to it are
removed. Before, it was checking if the direct successor was the landing
pad. But it could be the result of jumping through multiple basic blocks to get
to it. If we were to only check for the existence of an EH_LABEL in the basic
block and not remove successors if it's in there, then it could stop actually
dead basic blocks from being removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91092
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 11 Dec 2009 01:42:04 +0000 (01:42 +0000)]
Rough first pass at compare_and_swap atomic builtins for ARM mode. Work in progress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91090
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Carlsson [Fri, 11 Dec 2009 01:04:42 +0000 (01:04 +0000)]
Add qualifiers for calls to member functions in dependent bases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91087
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 10 Dec 2009 23:25:41 +0000 (23:25 +0000)]
If VariableDIe is not created (may be because global was optimzed away) then do not try to use the variable die.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91077
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 10 Dec 2009 21:11:40 +0000 (21:11 +0000)]
Add a test for the fix in revision 91009.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91062
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 10 Dec 2009 20:59:45 +0000 (20:59 +0000)]
It's not safe to coalesce a move where src and dst registers have different subregister indices. e.g.:
%reg16404:1<def> = MOV8rr %reg16412:2<kill>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91061
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Thu, 10 Dec 2009 19:52:22 +0000 (19:52 +0000)]
Remove a broken, unused header
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91058
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 10 Dec 2009 19:14:49 +0000 (19:14 +0000)]
Refactor code that finds context for a given die.
Create global variable DIEs after creating subprogram DIEs. This allows function level static variable's to find their context at the time of DIE creation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91055
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 10 Dec 2009 18:35:32 +0000 (18:35 +0000)]
Add instruction encoding for DMB/DSB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91053
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 10 Dec 2009 18:05:33 +0000 (18:05 +0000)]
Refactor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91051
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 10 Dec 2009 17:48:32 +0000 (17:48 +0000)]
Also attempt trivial coalescing for live intervals that end in a copy.
The coalescer is supposed to clean these up, but when setting up parameters
for a function call, there may be copies to physregs. If the defining
instruction has been LICM'ed far away, the coalescer won't touch it.
The register allocation hint does not always work - when the register
allocator is backtracking, it clears the hints.
This patch is more conservative than r90502, and does not break
483.xalancbmk/i686. It still breaks the PowerPC bootstrap, so it is disabled
by default, and can be enabled with the -trivial-coalesce-ends option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91049
91177308-0d34-0410-b5e6-
96231b3b80d8
Torok Edwin [Thu, 10 Dec 2009 10:01:47 +0000 (10:01 +0000)]
Comparing std::string with NULL is a bad idea, so just check whether its empty.
This code was crashing always with oprofile enabled, since it tried to create a StringRef
out of NULL, which run strlen on NULL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91046
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 10 Dec 2009 00:25:41 +0000 (00:25 +0000)]
Make sure the immediate dominator isn't NULL through iterations
of the loop. We could get to this condition via indirect
branches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91009
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Dec 2009 00:11:45 +0000 (00:11 +0000)]
Fix PR5744, a case where we were getting the pointer size instead of the
value size. This only manifested when memdep inprecisely returns clobber,
which is do to a caching issue in the PR5744 testcase. We can 'efficiently
emulate' this by using '-no-aa'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91004
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 10 Dec 2009 00:11:09 +0000 (00:11 +0000)]
Add memory barrier intrinsic support for ARM. Moving towards adding the atomic operations intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91003
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 10 Dec 2009 00:04:46 +0000 (00:04 +0000)]
allow this to build when the #if 0's are enabled. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90999
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 9 Dec 2009 22:55:01 +0000 (22:55 +0000)]
Dereference loopHeader after checking for null rather than before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90990
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 9 Dec 2009 22:24:42 +0000 (22:24 +0000)]
Fix test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90988
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 9 Dec 2009 21:00:30 +0000 (21:00 +0000)]
Optimize splat of a scalar load into a shuffle of a vector load when it's legal. e.g.
vector_shuffle (scalar_to_vector (i32 load (ptr + 4))), undef, <0, 0, 0, 0>
=>
vector_shuffle (v4i32 load ptr), undef, <1, 1, 1, 1>
iff ptr is 16-byte aligned (or can be made into 16-byte aligned).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90984
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 9 Dec 2009 18:48:53 +0000 (18:48 +0000)]
Reuse the Threshold value to size these containers because it's
currently somewhat convenient for them to have the same value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90980
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 9 Dec 2009 18:24:21 +0000 (18:24 +0000)]
Reapply r90858, a cleanup patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90979
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 18:21:46 +0000 (18:21 +0000)]
fix hte last remaining known (by me) phi translation bug. When we reanalyze
clobbers to forward pieces of large stores to small loads, we need to consider
the properly phi translated pointer in the store block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90978
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 18:13:28 +0000 (18:13 +0000)]
change GetStoreValueForLoad to use IRBuilder, which is cleaner and
implicitly constant folds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90977
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 9 Dec 2009 18:05:27 +0000 (18:05 +0000)]
Fix a comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90975
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 17:27:45 +0000 (17:27 +0000)]
Add a minor optimization: if we haven't changed the operands of an
add, there is no need to scan the world to find the same add again.
This invalidates the previous testcase, which wasn't wonderful anyway,
because it needed a run of instcombine to permute the use-lists in
just the right way to before GVN was run (so it was really fragile).
Not a big loss.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90973
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Wed, 9 Dec 2009 17:26:02 +0000 (17:26 +0000)]
Add note about loadable modules on windows.
Patch by Gregory Petrosyan!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 17:18:49 +0000 (17:18 +0000)]
fix PR5733, a case where we'd replace an add with a lexically identical
binary operator that wasn't an add. In this case, a xor. Whoops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90971
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Wed, 9 Dec 2009 17:18:22 +0000 (17:18 +0000)]
<rdar://problem/
7453528>. Track only physical registers that are valid for the target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90970
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 17:17:26 +0000 (17:17 +0000)]
merge crash-2.ll into crash.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90969
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 9 Dec 2009 08:29:32 +0000 (08:29 +0000)]
Silence conversion warning from 64 to 32-bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90962
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 07:37:07 +0000 (07:37 +0000)]
change AnalyzeLoadFromClobberingMemInst/AnalyzeLoadFromClobberingStore
to require the load ty/ptr to be passed in, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90960
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 07:34:10 +0000 (07:34 +0000)]
change AnalyzeLoadFromClobberingWrite and clients to pass in type
and pointer instead of the load. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90959
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 07:31:04 +0000 (07:31 +0000)]
enhance NonLocalDepEntry to keep the per-block phi translated address
of the query.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90958
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 9 Dec 2009 07:19:48 +0000 (07:19 +0000)]
DeltaAlgorithm: Add a virtual destructor and home.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90957
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 07:08:01 +0000 (07:08 +0000)]
change NonLocalDepEntry from being a typedef for an std::pair to be its
own small class. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90956
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 9 Dec 2009 05:39:12 +0000 (05:39 +0000)]
Added a new "splitting" spiller.
When a call is placed to spill an interval this spiller will first try to
break the interval up into its component values. Single value intervals and
intervals which have already been split (or are the result of previous splits)
are spilled by the default spiller.
Splitting intervals as described above may improve the performance of generated
code in some circumstances. This work is experimental however, and it still
miscompiles many benchmarks. It's not recommended for general use yet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90951
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 9 Dec 2009 03:26:33 +0000 (03:26 +0000)]
Remove spurious extern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90937
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 9 Dec 2009 02:58:09 +0000 (02:58 +0000)]
Remove unneeded ';' and a class/struct mismatch (noticed by clang).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90934
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 02:43:05 +0000 (02:43 +0000)]
the code in GVN that tries to forward large loads to small
stores is not phi translating, thus it miscompiles really
crazy testcases. This is from inspection, I haven't seen
this in the wild.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90930
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 02:41:54 +0000 (02:41 +0000)]
add some aborts to #if 0's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90929
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 01:59:31 +0000 (01:59 +0000)]
Switch GVN and memdep to use PHITransAddr, which correctly handles
phi translation of complex expressions like &A[i+1]. This has the
following benefits:
1. The phi translation logic is all contained in its own class with
a strong interface and verification that it is self consistent.
2. The logic is more correct than before. Previously, if intermediate
expressions got PHI translated, we'd miss the update and scan for
the wrong pointers in predecessor blocks. @phi_trans2 is a testcase
for this.
3. We have a lot less code in memdep.
We can handle phi translation across blocks of things like @phi_trans3,
which is pretty insane :).
This patch should fix the miscompiles of 255.vortex, and I tested it
with a bootstrap of llvm-gcc, llvm-test and dejagnu of course.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90926
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 9 Dec 2009 01:53:58 +0000 (01:53 +0000)]
Teach InferPtrAlignment to infer GV+cst alignment and use it to simplify x86 isl lowering code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90925
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 9 Dec 2009 01:46:00 +0000 (01:46 +0000)]
Remove tests that are not suitable anymore. Plus they are not testing the original bugfixes anymore. These tests were inserted to check bug fixes in code that handled debug info intrinsics. These intrinsics are no longer used and now llvm parser simply ignores old .dbg intrinsics from these dead tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90923
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 9 Dec 2009 01:36:00 +0000 (01:36 +0000)]
Move isConsecutiveLoad to SelectionDAG. It's not target dependent and it's primary used by selectdag passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90922
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 01:19:16 +0000 (01:19 +0000)]
fix a nasty variable that was shadowing the real CurBB but with the wrong value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90920
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 9 Dec 2009 01:17:24 +0000 (01:17 +0000)]
Infer alignment for non-fixed stack object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90919
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 9 Dec 2009 01:10:37 +0000 (01:10 +0000)]
Add const qualifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90918
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 9 Dec 2009 01:04:59 +0000 (01:04 +0000)]
Refactor InferAlignment out of DAGCombine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90917
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 00:56:14 +0000 (00:56 +0000)]
fix many input tracking bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90915
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 00:41:28 +0000 (00:41 +0000)]
when opt crashes, print its command line arguments as a pretty stack trace.
Somehow opt was missed when this was added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90912
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 9 Dec 2009 00:28:42 +0000 (00:28 +0000)]
Fix a typo in a comment, and adjust SmallSet and SmallVector sizes,
that Chris noticed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90910
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 00:18:13 +0000 (00:18 +0000)]
fix PHI translation to take the PHI out of the instinputs set and add
the translated value back to it if an instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90909
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 00:10:55 +0000 (00:10 +0000)]
instructions defined in CurBB may be intermediate nodes of the computation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90908
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 9 Dec 2009 00:01:00 +0000 (00:01 +0000)]
add dumping and sanity checking support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90906
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 8 Dec 2009 23:59:12 +0000 (23:59 +0000)]
Put a threshold on the number of users PointerMayBeCaptured
examines; fall back to a conservative answer if there are
more. This works around some several compile time problems
resulting from BasicAliasAnalysis calling PointerMayBeCaptured.
The value has been chosen arbitrarily.
This fixes rdar://
7438917 and may partially address PR5708.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90905
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 8 Dec 2009 23:42:51 +0000 (23:42 +0000)]
make sure that PHITransAddr keeps its 'InstInputs' list up to
date when instsimplify kicks in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90901
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 8 Dec 2009 23:21:45 +0000 (23:21 +0000)]
Revert 90858 90875 and 90805 for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90898
91177308-0d34-0410-b5e6-
96231b3b80d8