Commit Graph

80768 Commits

Author SHA1 Message Date
Chad Rosier
483454f2f1 Add href to clang in overview.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151503 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 21:34:02 +00:00
Chad Rosier
372b8221b7 Remove references to llvm-gcc from overview and tutorial.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151502 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 21:31:25 +00:00
Nadav Rotem
bfb7dfa756 Add support for random constant vectors.
Patch by Joey Gouly.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151489 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 13:56:18 +00:00
Nadav Rotem
794c16ae85 Style fix: Remove unneeded parentheses.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151488 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 12:34:17 +00:00
Nadav Rotem
2e851a9abf Fix a bug in the code that checks if a store value is a vector of i1s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151487 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 12:00:22 +00:00
Nadav Rotem
08c8339307 Fix compilation on MSVC. Rename "_BB" to "Block"
Thanks zygoloid.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151481 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 08:59:25 +00:00
Nadav Rotem
c367dfc2f4 fix a copy-and-paste error in the docs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151480 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 08:43:43 +00:00
Nadav Rotem
fdc309cc4e Add a random .LL file generator to stress-test different llvm components.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151479 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 08:35:53 +00:00
Rafael Espindola
a515b4e014 Add testcase for the previous commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151475 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 05:49:57 +00:00
Rafael Espindola
5465c9422f Don't call dominates on unreachable instructions. Should fix the dragonegg
build. Testcase is still reducing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151474 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 05:30:08 +00:00
Hal Finkel
34674743f5 Default TargetData alignment information for 128-bit floating-point types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151473 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 04:13:31 +00:00
Rafael Espindola
32c185eb27 And update the comment...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151472 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 02:36:56 +00:00
Rafael Espindola
5b04cfb785 Enable the assert that got all this dominator work started.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151471 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 02:29:18 +00:00
Rafael Espindola
c987f4cf6c Use the DT dominates function in the verifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151470 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 02:23:37 +00:00
Rafael Espindola
c9ae8cc24c Change the implementation of dominates(inst, inst) to one based on what the
verifier does. This correctly handles invoke.
Thanks to Duncan, Andrew and Chris for the comments.
Thanks to Joerg for the early testing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151469 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 02:19:19 +00:00
Rafael Espindola
8691216d91 Don't call dominates on unreachable instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151468 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 02:14:25 +00:00
Nick Lewycky
f7087ea508 Reinstate the optimization from r151449 with a fix to not turn 'gep %x' into
'gep null' when the icmp predicate is unsigned (or is signed without inbounds).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151467 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 02:09:49 +00:00
Rafael Espindola
8c727f9200 Don't call dominates on unreachable instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151466 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-26 01:50:14 +00:00
Nick Lewycky
6fd3428afa Roll these back to r151448 until I figure out how they're breaking
MultiSource/Applications/lua.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151463 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 23:01:19 +00:00
Nick Lewycky
28e215ba63 An argument and a local identified object (eg. a noalias call) could turn out
equal if both are null. In the test, scope type %t and global @y by adding a
'gep' prefix to them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151452 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 20:19:07 +00:00
Nick Lewycky
6bfb9d6a13 Fix five-letter typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151450 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 19:12:58 +00:00
Nick Lewycky
1e4e1c768b Teach instsimplify to be more aggressive when analyzing comparisons of pointers
by using llvm::isIdentifiedObject. Also teach it to handle GEPs that have
the same base pointer and constant operands. Fixes PR11238!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151449 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 19:07:42 +00:00
Nick Lewycky
55f4ab84e5 Move isKnownNonNull from private implementation detail of BasicAA to a public
function that others can use, next to llvm::isIdentifiedObject.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151446 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 10:56:28 +00:00
Nick Lewycky
1d05c215dd Remove spurious emacs mode marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151440 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 07:20:06 +00:00
Hal Finkel
9b4d708868 Revert r151278, breaks static linking.
Reverting this because it breaks static linking on ppc64. Specifically, it may be linkonce_odr functions that are the problem.
With this patch, if you link statically, calls to some functions end up calling their descriptor addresses instead
of calling to their entry points. This causes the execution to fail with SIGILL (b/c the descriptor address just
has some pointers, not code).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151433 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 03:40:11 +00:00
NAKAMURA Takumi
9a68fdc7f8 Target/X86: Fix assertion failures and warnings caused by r151382 _ftol2 lowering for i386-*-win32 targets. Patch by Joe Groff.
[Joe Groff] Hi everyone. My previous patch applied as r151382 had a few problems:
Clang raised a warning, and X86 LowerOperation would assert out for
fptoui f64 to i32 because it improperly lowered to an illegal
BUILD_PAIR. Here's a patch that addresses these issues. Let me know if
any other changes are necessary. Thanks.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151432 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 03:37:25 +00:00
Chad Rosier
dfba3ad882 Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151431 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 03:07:57 +00:00
Chad Rosier
fa086f1f00 Add support for disabling llvm.lifetime intrinsics in the AlwaysInliner. These
are optimization hints, but at -O0 we're not optimizing.  This becomes a problem
when the alwaysinline attribute is abused.
rdar://10921594



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151429 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 02:56:01 +00:00
Lang Hames
c69cbd0a74 Make the peephole optimizer clear kill flags on a vreg if it's about to add new
uses of the vreg, since the old kills may no longer be valid.  This was causing
-verify-machineinstrs to complain about uses after kills, and could potentially
have been causing subtle register allocation issues, but I haven't come across a
test case yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151425 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 02:01:00 +00:00
Chad Rosier
ff16eb64f5 Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151420 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 01:10:59 +00:00
Eric Christopher
3c3cdcc270 Grammar-o.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151418 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 01:02:44 +00:00
Lang Hames
3b26eb6294 Fixed typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151417 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 00:46:38 +00:00
Akira Hatanaka
e4ea241853 Add definitions of floating point multiply add/sub and negative multiply
add/sub instructions.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151415 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-25 00:21:52 +00:00
Akira Hatanaka
648f00c2f0 Add an option to use a virtual register as the global base register instead of
reserving a physical register ($gp or $28) for that purpose.

This will completely eliminate loads that restore the value of $gp after every
function call, if the register allocator assigns a callee-saved register, or
eliminate unnecessary loads if it assigns a temporary register. 

example:

.cpload $25       // set $gp.
...
.cprestore 16     // store $gp to stack slot 16($sp).
...
jalr $25          // function call. clobbers $gp.
lw $gp, 16($sp)   // not emitted if callee-saved reg is chosen.
...
lw $2, 4($gp)
...
jalr $25          // function call.
lw $gp, 16($sp)   // not emitted if $gp is not live after this instruction.
...



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151402 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 22:34:47 +00:00
Benjamin Kramer
120cfdf0e0 Remove unused cl::opt, make another opt static.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151398 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 22:09:25 +00:00
Jakob Stoklund Olesen
f79b489571 Add missing static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151396 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 21:52:44 +00:00
Ahmed Charles
969b739fb9 Fix undefined behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151385 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 19:06:15 +00:00
Jim Grosbach
9e931f6a64 Thumb2 asm aliases for wide bitwise w/ immediate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151384 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 19:06:05 +00:00
Chris Lattner
009e2650d6 fix PR12075, a regression in a recent transform I added. In unreachable code, gep chains can be infinite. Just like "stripPointerCasts", use a set to keep track of visited instructions so we don't recurse infinitely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151383 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 19:01:58 +00:00
Michael J. Spencer
1a2d061ec0 Add WIN_FTOL_* psudo-instructions to model the unique calling convention
used by the Win32 _ftol2 runtime function. Patch by Joe Groff!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151382 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 19:01:22 +00:00
Jakob Stoklund Olesen
27bc818eaf Add a -stress-regalloc=<N> option.
This will limit all register classes to N registers in order to stress
test register allocation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151379 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 18:34:20 +00:00
Hal Finkel
3161039cf3 X11/X2 loads around indirect calls on ppc64 should not be deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151374 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 17:54:01 +00:00
Hal Finkel
f77c03a859 Don't crash when a glue node contains an internal CopyToReg
This is necessary to support the existing ppc lowering code for indirect calls.
Fixes PR12071.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151373 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 17:53:59 +00:00
Duncan Sands
e170c76ccd Teach GVN that x+y is the same as y+x and that x<y is the same as y>x.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151365 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 15:16:31 +00:00
Benjamin Kramer
8b93ff298c SDAGBuilder: Remove register sets that were never read and prune dead code surrounding it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151364 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 14:01:17 +00:00
Kristof Beyls
8a4eb29b2f test commit. removing unnecessary whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151363 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 13:52:45 +00:00
NAKAMURA Takumi
b1933c02bc test/CodeGen/X86/2012-02-23-mmx-inlineasm.ll: Fixup to add -march=x86.
-mcpu does not choose arch automatically, on non-x86 hosts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151362 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 13:29:50 +00:00
Richard Osborne
19411101a1 Remove dead code.
Patch by Ahmed Charles


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151360 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 11:49:08 +00:00
Duncan Sands
37b6e5ae7d Workaround a miscompilation by gcc-4.3 that showed up as a failure
of the StringRef.Split2 unittest on 32 bit machines.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151358 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 09:01:34 +00:00
Nick Lewycky
aaad5f2b9a ScheduleDAGInstrs.h:155: warning: suggest parentheses around &&' within ||'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151355 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-24 07:59:05 +00:00