Commit Graph

12726 Commits

Author SHA1 Message Date
Dale Johannesen
e37c9e59b4 Fix comment typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113728 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-12 22:36:13 +00:00
Chris Lattner
cbf8a98c7c fix the asmparser so that the target is responsible for skipping to
the end of the line on a parser error, allowing skipping to happen
for syntactic errors but not for semantic errors.  Before we would
miss emitting a diagnostic about the second line, because we skipped
it due to the semantic error on the first line:

  foo %eax
  bar %al

This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113688 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-11 16:18:25 +00:00
Bill Wendling
a65568676d Rename ConvertToSetZeroFlag to something more general.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113670 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-11 00:13:50 +00:00
Bill Wendling
3665661a57 No need to recompute the SrcReg and CmpValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113666 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 23:46:12 +00:00
Bill Wendling
92ad57f066 Move some of the decision logic for converting an instruction into one that sets
the 'zero' bit down into the back-end. There are other cases where this logic
isn't sufficient, so they should be handled separately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113665 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 23:34:19 +00:00
Gabor Greif
e2d50046fd typoes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113647 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 22:25:58 +00:00
Dale Johannesen
401e2d3386 Add missing X86 MMX declarations. Hopefully fixes buildbot?
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113643 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:58:02 +00:00
Bill Wendling
220e240bdf Modify the comparison optimizations in the peephole optimizer to update the
iterator when an optimization took place. This allows us to do more insane
things with the code than just remove an instruction or two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113640 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 21:55:43 +00:00
Dale Johannesen
bb811a2445 Add X86 MMX type to bitcode and Type.
(The Ada bindings probably need it too, but all the
obvious places to change say "do not edit this file".)



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113618 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 20:55:01 +00:00
Bill Wendling
de49f360ec Auto-upgrade the magic ".llvm.eh.catch.all.value" global to
"llvm.eh.catch.all.value". Only the name needs to be changed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113600 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 18:51:56 +00:00
Dale Johannesen
d6934e4cee x86mmx is 64 bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113594 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 17:51:47 +00:00
Jim Grosbach
cc38399ea9 add a comment explicitly calling out that allocation orders may include
reserved regs and that register allocators need to explicitly check for
them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113593 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 17:51:34 +00:00
Evan Cheng
3ef1c8759a Teach if-converter to be more careful with predicating instructions that would
take multiple cycles to decode.
For the current if-converter clients (actually only ARM), the instructions that
are predicated on false are not nops. They would still take machine cycles to
decode. Micro-coded instructions such as LDM / STM can potentially take multiple
cycles to decode. If-converter should take treat them as non-micro-coded
simple instructions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113570 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-10 01:29:16 +00:00
Dan Gohman
70c2fc0823 Discard metadata produced by LLVM 2.7. The value enumeration it used
is different from what the code now uses in a two ways: NamedMDNodes
were considered Values and included in the numbering, and the
function-local metadata counter wasn't reset between functions.

The later problem breaks lazy deserialization, so instead of trying
to emulate the old numbering, just drop the old metadata. The only
in-tree use case is debug info with LTO, where the QOI loss is
considered acceptable.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113557 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 23:12:39 +00:00
Owen Anderson
f9a26b89f8 What the loop unroller cares about, rather than just not unrolling loops with calls, is
not unrolling loops that contain calls that would be better off getting inlined.  This mostly
comes up when an interleaved devirtualization pass has devirtualized a call which the inliner
will inline on a future pass.  Thus, rather than blocking all loops containing calls, add
a metric for "inline candidate calls" and block loops containing those instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113535 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 20:32:23 +00:00
Dan Gohman
c8ddbdabb6 Extend the getDependence query with support for PHI translation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113521 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:37:31 +00:00
Dan Gohman
e744541788 Add a getPointerOperand() helper function to VAArgInst, for consistency
with LoadInst and StoreInst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113520 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:32:40 +00:00
Evan Cheng
5f54ce3473 For each instruction itinerary class, specify the number of micro-ops each
instruction in the class would be decoded to. Or zero if the number of
uOPs must be determined dynamically.

This will be used to determine the cost-effectiveness of predicating a
micro-coded instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113513 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:18:55 +00:00
Dan Gohman
c48bf0c394 Fix this comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113511 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 18:04:22 +00:00
Roman Divacky
5baf79edc0 Make ELF OS ABI dependent on the OS from target triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113508 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 17:57:50 +00:00
Owen Anderson
082bf2a977 Refactor code-size reduction estimation methods out of InlineCostAnalyzer and into CodeMetrics. They
don't use any InlineCostAnalyzer state, and are useful for other clients who don't necessarily want to use
all of InlineCostAnalyzer's logic, some of which is fairly inlining-specific.

No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113499 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-09 16:56:42 +00:00
Jakob Stoklund Olesen
6c4329ec96 Rearrange for better alignment and less padding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113445 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 23:54:00 +00:00
Jakob Stoklund Olesen
71160b44d7 Remove dead code and data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 21:21:28 +00:00
Jakob Stoklund Olesen
4a4bc3fba6 Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113386 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 18:50:24 +00:00
Owen Anderson
eb92330c1d Move private member functions to the end of the class declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113385 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 18:41:07 +00:00
Owen Anderson
1e8d5d2e22 Make module ownership methods on LLVMContext private, and make Module a friend
so that it can access them.  These are not intended to be externally accessible APIs.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113380 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 18:22:11 +00:00
Owen Anderson
30268be89d Clarify the ownership model of LLVMContext and Module. Namely, contexts own
modules are instantiated in them.  If the context is deleted, all of its owned
modules are also deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113374 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 18:03:32 +00:00
Dan Gohman
65924111bf Add a new experimental generalized dependence query interface to
AliasAnalysis, and some code for implementing the new query on top of
existing implementations by making standard alias and getModRefInfo
queries.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113329 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-08 01:32:20 +00:00
Bill Wendling
7f6d62aaf9 Remove untrue comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113287 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 21:07:59 +00:00
Owen Anderson
2da497902a Remove dead code. ManagedCleanup is unused, and contained a serious bug in that
the provided cleanup function is never actually called.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113284 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 20:53:39 +00:00
Owen Anderson
381f17ee7c Fix PR7972, in which the PassRegistry was being leaked. As part of this,
switch to using a ManagedStatic for the global PassRegistry instead of a
ManagedCleanup, and fix a destruction ordering bug this exposed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113283 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 20:48:10 +00:00
Dan Gohman
fa6cb8d821 Tidy up the getModRefInfo declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113275 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 20:37:47 +00:00
Owen Anderson
c88c11d607 Properly initialize the pImpl member of PassRegistry to zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 20:13:48 +00:00
Owen Anderson
a4b06f7c55 Add doxygen comments for PassRegistry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 20:04:26 +00:00
Bill Wendling
d8dd5757e0 Add an MVT::x86mmx type. It will take the place of all current MMX vector types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 20:03:56 +00:00
Owen Anderson
6bcd3a0265 Clean up some of the PassRegistry implementation, and pImpl-ize it to reduce #include clutter
and exposing internal details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 19:16:25 +00:00
Nick Lewycky
f7a3c50183 Create PTX backend. Patch by Che-Liang Chiou!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 18:14:24 +00:00
Dale Johannesen
86097c384f Add patterns for MMX that use the new intrinsics.
Enable palignr intrinsic.
These may need adjustment for a new VT in due course.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 18:10:56 +00:00
Nick Lewycky
198381e542 Add completely hokey binary-and and binary-or operations to ConstantRange and
teach LazyValueInfo to use them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-07 05:39:02 +00:00
Nick Lewycky
32cda119ef Add a new isSignWrappedSet() method to ConstantRange.
Fix zeroExtend and signExtend to support empty sets, and to return the smallest
possible result set which contains the extension of each element in their
inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10)
which contains 63446 members.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113187 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 23:52:49 +00:00
Chris Lattner
adc799112d pull a simple method out of LICM into a new
Loop::hasLoopInvariantOperands method. Remove
a useless and confusing Loop::isLoopInvariant(Instruction)
method, which didn't do what you thought it did.

No functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113133 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 01:05:37 +00:00
Chris Lattner
223c92c9cd fix inconsistent formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113121 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-05 22:43:56 +00:00
Chris Lattner
beac75da37 implement rdar://6653118 - fastisel should fold loads where possible.
Since mem2reg isn't run at -O0, we get a ton of reloads from the stack,
for example, before, this code:

int foo(int x, int y, int z) {
  return x+y+z;
}

used to compile into:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	movl	4(%rsp), %esi
	addl	%edx, %esi
	movl	(%rsp), %edx
	addl	%esi, %edx
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Now we produce:

_foo:                                   ## @foo
	subq	$12, %rsp
	movl	%edi, 8(%rsp)
	movl	%esi, 4(%rsp)
	movl	%edx, (%rsp)
	movl	8(%rsp), %edx
	addl	4(%rsp), %edx    ## Folded load
	addl	(%rsp), %edx     ## Folded load
	movl	%edx, %eax
	addq	$12, %rsp
	ret

Fewer instructions and less register use = faster compiles.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113102 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-05 02:18:34 +00:00
Jakob Stoklund Olesen
07c2b7ff68 Remove dead code.
Clobber ranges are no longer used when joining physical registers.
Instead, all aliases are checked for interference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113084 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-04 21:09:33 +00:00
Chris Lattner
061d21eaf8 fix this to work with allocators that have reference type with compilers
that diagnose invalid references to references.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113078 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-04 18:45:02 +00:00
Eric Christopher
2429e2ac23 Reapply this increase to the number of virtual registers. All of the
various breakages appear to be dealt with.

Patch by Pekka Jääskeläinen.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113024 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03 22:46:31 +00:00
Jim Grosbach
260fbf2b57 Add 'const' to getter function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112984 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03 18:17:16 +00:00
Owen Anderson
d84668446c Re-enable CorrelatedValuePropagation. I've tested nightly tests, llvm-gcc
bootstrap, and clang self-host.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112948 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03 04:16:28 +00:00
Bob Wilson
eb0c3d3729 Replace NEON vabdl, vaba, and vabal intrinsics with combinations of the
vabd intrinsic and add and/or zext operations.  In the case of vaba, this
also avoids the need for a DAG combine pattern to combine vabd with add.
Update tests.  Auto-upgrade the old intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112941 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-03 01:35:08 +00:00
Chris Lattner
1dbb3879e8 lets get crazy and name the header file the exact class name,
not a scrunched version of it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112904 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-02 23:09:42 +00:00