Nick Lewycky [Sat, 25 Feb 2012 23:01:19 +0000 (23:01 +0000)]
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
Nick Lewycky [Sat, 25 Feb 2012 20:19:07 +0000 (20:19 +0000)]
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
Nick Lewycky [Sat, 25 Feb 2012 19:12:58 +0000 (19:12 +0000)]
Fix five-letter typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151450
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sat, 25 Feb 2012 19:07:42 +0000 (19:07 +0000)]
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
Nick Lewycky [Sat, 25 Feb 2012 10:56:28 +0000 (10:56 +0000)]
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
Nick Lewycky [Sat, 25 Feb 2012 07:20:06 +0000 (07:20 +0000)]
Remove spurious emacs mode marker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151440
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 25 Feb 2012 03:40:11 +0000 (03:40 +0000)]
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
NAKAMURA Takumi [Sat, 25 Feb 2012 03:37:25 +0000 (03:37 +0000)]
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
Chad Rosier [Sat, 25 Feb 2012 03:07:57 +0000 (03:07 +0000)]
Add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151431
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Sat, 25 Feb 2012 02:56:01 +0000 (02:56 +0000)]
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
Lang Hames [Sat, 25 Feb 2012 02:01:00 +0000 (02:01 +0000)]
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
Chad Rosier [Sat, 25 Feb 2012 01:10:59 +0000 (01:10 +0000)]
Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151420
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Sat, 25 Feb 2012 01:02:44 +0000 (01:02 +0000)]
Grammar-o.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151418
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Sat, 25 Feb 2012 00:46:38 +0000 (00:46 +0000)]
Fixed typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151417
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 25 Feb 2012 00:21:52 +0000 (00:21 +0000)]
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
Akira Hatanaka [Fri, 24 Feb 2012 22:34:47 +0000 (22:34 +0000)]
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
Benjamin Kramer [Fri, 24 Feb 2012 22:09:25 +0000 (22:09 +0000)]
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
Jakob Stoklund Olesen [Fri, 24 Feb 2012 21:52:44 +0000 (21:52 +0000)]
Add missing static
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151396
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Charles [Fri, 24 Feb 2012 19:06:15 +0000 (19:06 +0000)]
Fix undefined behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151385
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 24 Feb 2012 19:06:05 +0000 (19:06 +0000)]
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
Chris Lattner [Fri, 24 Feb 2012 19:01:58 +0000 (19:01 +0000)]
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
Michael J. Spencer [Fri, 24 Feb 2012 19:01:22 +0000 (19:01 +0000)]
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
Jakob Stoklund Olesen [Fri, 24 Feb 2012 18:34:20 +0000 (18:34 +0000)]
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
Hal Finkel [Fri, 24 Feb 2012 17:54:01 +0000 (17:54 +0000)]
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
Hal Finkel [Fri, 24 Feb 2012 17:53:59 +0000 (17:53 +0000)]
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
Duncan Sands [Fri, 24 Feb 2012 15:16:31 +0000 (15:16 +0000)]
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
Benjamin Kramer [Fri, 24 Feb 2012 14:01:17 +0000 (14:01 +0000)]
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
Kristof Beyls [Fri, 24 Feb 2012 13:52:45 +0000 (13:52 +0000)]
test commit. removing unnecessary whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151363
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 24 Feb 2012 13:29:50 +0000 (13:29 +0000)]
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
Richard Osborne [Fri, 24 Feb 2012 11:49:08 +0000 (11:49 +0000)]
Remove dead code.
Patch by Ahmed Charles
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151360
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 24 Feb 2012 09:01:34 +0000 (09:01 +0000)]
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
Nick Lewycky [Fri, 24 Feb 2012 07:59:05 +0000 (07:59 +0000)]
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
Andrew Trick [Fri, 24 Feb 2012 07:04:55 +0000 (07:04 +0000)]
PostRA sched: speed up physreg tracking by not abusing SparseSet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151348
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 24 Feb 2012 05:12:18 +0000 (05:12 +0000)]
ARM Thumb symbol references in assembly need the low bit set.
Add support for a missed case when the symbols in a difference
expression are in the same section but not the same fragment.
rdar://
10924681
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151345
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Fri, 24 Feb 2012 03:51:49 +0000 (03:51 +0000)]
Turn avx insert intrinsic calls into INSERT_SUBVECTOR DAG nodes and remove duplicate patterns for selecting the intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151342
91177308-0d34-0410-b5e6-
96231b3b80d8
Jia Liu [Fri, 24 Feb 2012 02:17:26 +0000 (02:17 +0000)]
comment fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151341
91177308-0d34-0410-b5e6-
96231b3b80d8
Jia Liu [Fri, 24 Feb 2012 02:15:57 +0000 (02:15 +0000)]
some comment fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151340
91177308-0d34-0410-b5e6-
96231b3b80d8
Jia Liu [Fri, 24 Feb 2012 02:15:21 +0000 (02:15 +0000)]
comment fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151339
91177308-0d34-0410-b5e6-
96231b3b80d8
Jia Liu [Fri, 24 Feb 2012 02:05:28 +0000 (02:05 +0000)]
replace a balnk with -
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151337
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 24 Feb 2012 01:59:08 +0000 (01:59 +0000)]
If the Address of a variable is an argument then treat the entire
variable declaration as an argument because we want that address
anyhow for our debug information.
This seems to fix rdar://
9965111, at least we have more debug
information than before and from reading the assembly it appears
to be the correct location.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151335
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 24 Feb 2012 01:59:01 +0000 (01:59 +0000)]
Tabs, formatting and long lines oh my!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151334
91177308-0d34-0410-b5e6-
96231b3b80d8
Jia Liu [Fri, 24 Feb 2012 01:47:01 +0000 (01:47 +0000)]
80 columns of Mips InstPrinter Makefile
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151332
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 24 Feb 2012 01:19:29 +0000 (01:19 +0000)]
Switch ARM target to register masks.
I'll let the buildbots determine the compile time improvements from this
change, but 464.h264ref has 5% faster codegen at -O2.
This patch does cause some assembly changes. Branch folding can make
different decisions about calls with dead return values.
CriticalAntiDepBreaker may choose different registers because its
liveness tracking is affected. MachineCopyPropagation may sometimes
leave a dead copy behind.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151331
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 24 Feb 2012 00:53:11 +0000 (00:53 +0000)]
Make sure the regs are low regs for tMUL size reduction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151318
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 24 Feb 2012 00:33:36 +0000 (00:33 +0000)]
Thumb2 size reduction fix for tied operands of tMUL.
The tied source operand of tMUL is the second source operand, not the
first like every other two-address thumb instruction. Special case it
in the size reduction pass to make sure we create the tMUL instruction
properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151315
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 24 Feb 2012 00:20:08 +0000 (00:20 +0000)]
EE/Interpreter/ExternalFunctions.cpp: Staticize lle_X_() entries. They can be mapped in FuncNames[] at the initialization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151313
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 24 Feb 2012 00:19:58 +0000 (00:19 +0000)]
EE/Interpreter/ExternalFunctions.cpp: Prune "C" linkage to suppress warnings with -Wreturn-type (and MSC's w4190).
In historical reason, Interpreter's external entries had prefix "lle_X_" as C linkage, even for well-known entries in EE/Interpreter.
Now, at least on ToT, they are resolved via FuncNames[] mapper.
We will not need their symbols are expected to be exported any more.
Clang r150128 has introduced the warning <"%0 has C-linkage specified, but returns user-defined type %1 which is incompatible with C">.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151312
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 24 Feb 2012 00:09:36 +0000 (00:09 +0000)]
When emitting a cmp with 0 for a lowered select, mask out the high
bits of the value carying the boolean condition, as their contents
are undefined. This fixes rdar://
10887484.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151310
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 23 Feb 2012 23:52:06 +0000 (23:52 +0000)]
Release not for ARM integrated assembler support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151308
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 23 Feb 2012 23:25:25 +0000 (23:25 +0000)]
Allow an integer to be converted into an MMX type when it's used in an inline
asm.
<rdar://problem/
10106006>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151303
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 23 Feb 2012 23:21:22 +0000 (23:21 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151302
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 23 Feb 2012 21:56:08 +0000 (21:56 +0000)]
Emit global ctors into .CRT$XCU instead of .ctors on Win32. Patch by Joe Groff!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151289
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 23 Feb 2012 21:23:24 +0000 (21:23 +0000)]
The LLVM Getting Started documentation is out of date. It would be nice if
someone could update this, but for now at least reference the Clang Getting
Started document, which is much more current.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151285
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 23 Feb 2012 21:15:21 +0000 (21:15 +0000)]
Bump SmallString to the minimum required amount for raw_ostream to avoid allocation.
It's is a bit annoying, we should hide this implementation detail better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151284
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 23 Feb 2012 20:53:02 +0000 (20:53 +0000)]
Replace a DenseSet with SmallPtrSet.
SmallSet of pointer is the same as SmallPtrSet, use the latter directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151281
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Divacky [Thu, 23 Feb 2012 20:28:39 +0000 (20:28 +0000)]
MCize function entry label emission on PowerPC64 properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151278
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 23 Feb 2012 19:29:25 +0000 (19:29 +0000)]
BitVectorize loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151274
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 23 Feb 2012 19:15:40 +0000 (19:15 +0000)]
post-ra-sched: Turn the KillIndices vector into a bitvector, it only stored two meaningful states.
Rename it to LiveRegs to make it more clear what's stored inside.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151273
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 23 Feb 2012 18:28:32 +0000 (18:28 +0000)]
post-ra-sched: Replace a std::set of regs with a bitvector.
Assuming that a single std::set node adds 3 control words, a bitvector
can store (3*8+4)*8=224 registers in the allocated memory of a single
element in the std::set (x86_64). Also we don't have to call malloc
for every register added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151269
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Thu, 23 Feb 2012 18:18:17 +0000 (18:18 +0000)]
Updated the llvm-mc disassembler C API to support for the X86 target.
rdar://
10873652
As part of this I updated the llvm-mc disassembler C API to always call the
SymbolLookUp call back even if there is no getOpInfo call back. If there is a
getOpInfo call back that is tried first and then if that gets no information
then the SymbolLookUp is called. I also made the code more robust by
memset(3)'ing to zero the LLVMOpInfo1 struct before then setting
SymbolicOp.Value before for the call to getOpInfo. And also don't use any
values from the LLVMOpInfo1 struct if getOpInfo returns 0. And also don't
use any of the ReferenceType or ReferenceName values from SymbolLookUp if it
returns NULL. rdar://
10873563 and rdar://
10873683
For the X86 target also fixed bugs so the annotations get printed.
Also fixed a few places in the ARM target that was not producing symbolic
operands for some instructions. rdar://
10878166
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151267
91177308-0d34-0410-b5e6-
96231b3b80d8
Brendon Cahoon [Thu, 23 Feb 2012 18:17:17 +0000 (18:17 +0000)]
Fix the numbering of some of the registers and reclassify a couple of them.
Also, some basic clean up. Patch by Evandro Menezes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151266
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 23 Feb 2012 17:54:21 +0000 (17:54 +0000)]
Make calls scheduling boundaries post-ra.
Before register allocation, instructions can be moved across calls in
order to reduce register pressure. After register allocation, we don't
gain a lot by moving callee-saved defs across calls. In fact, since the
scheduler doesn't have a good idea how registers are used in the callee,
it can't really make good scheduling decisions.
This changes the schedule in two ways: 1. Latencies to call uses and
defs are no longer accounted for, causing some random shuffling around
calls. This isn't really a problem since those uses and defs are
inaccurate proxies for what happens inside the callee. They don't
represent registers used by the call instruction itself.
2. Instructions are no longer moved across calls. This didn't happen
very often, and the scheduling decision was made on dubious information
anyway.
As with any scheduling change, benchmark numbers shift around a bit,
but there is no positive or negative trend from this change.
This makes the post-ra scheduler 5% faster for ARM targets.
The secret motivation for this patch is the introduction of register
mask operands representing call clobbers. The most efficient way of
handling regmasks in ScheduleDAGInstrs is to model them as barriers for
physreg live ranges, but not for virtreg live ranges. That's fine
pre-ra, but post-ra it would have the same effect as this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151265
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 23 Feb 2012 17:42:19 +0000 (17:42 +0000)]
Reflow code, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151262
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 23 Feb 2012 17:19:34 +0000 (17:19 +0000)]
Make tests less sensitive to scheduling changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151260
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 23 Feb 2012 13:39:13 +0000 (13:39 +0000)]
Strip a layer of boilerplate from the VLIWPacketizer by storing the scheduler as an opaque pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151252
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 23 Feb 2012 11:01:22 +0000 (11:01 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151251
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Thu, 23 Feb 2012 10:36:04 +0000 (10:36 +0000)]
Fix to make sure that a comdat group gets generated correctly for a static member
of instantiated C++ templates.
Patch by Kristof Beyls!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151250
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Thu, 23 Feb 2012 09:33:44 +0000 (09:33 +0000)]
Update for the removal of Hashing.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151249
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Thu, 23 Feb 2012 09:17:40 +0000 (09:17 +0000)]
Reinstate r151049 now that GeneralHash is fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151248
91177308-0d34-0410-b5e6-
96231b3b80d8
Jay Foad [Thu, 23 Feb 2012 09:16:04 +0000 (09:16 +0000)]
The implementation of GeneralHash::addBits broke C++ aliasing rules; fix
it with memcpy. This also fixes a problem on big-endian hosts, where
addUnaligned would return different results depending on the alignment
of the data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151247
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 23 Feb 2012 08:42:06 +0000 (08:42 +0000)]
Remove 'if' from getSuperRegisters, getSubRegisters, and getOverlaps that were added in r151038.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151246
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 23 Feb 2012 08:25:25 +0000 (08:25 +0000)]
An easy case where GCC should really be able to work out that the value is only
used if IsInDevelopmentTree is 'true'. But it doesn't, so help it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151244
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 23 Feb 2012 08:23:53 +0000 (08:23 +0000)]
GCC warns about a comparison between signed and unsigned values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151243
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 23 Feb 2012 08:23:06 +0000 (08:23 +0000)]
GCC fails to understand that NextBB is always initialized if EvaluateBlock
returns 'true' and emits a warning. Help it out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151242
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 23 Feb 2012 05:38:51 +0000 (05:38 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151238
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 23 Feb 2012 03:39:43 +0000 (03:39 +0000)]
More newline cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151235
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 23 Feb 2012 03:39:39 +0000 (03:39 +0000)]
Add some handy-dandy newlines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151234
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 23 Feb 2012 03:16:24 +0000 (03:16 +0000)]
misched: cleanup reaching def computation
Ignore undef uses completely.
Use a more explicit SlotIndex API.
Add more explicit comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151233
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 23 Feb 2012 02:58:19 +0000 (02:58 +0000)]
Canonicalize (srl (bswap x), 16) to (rotr (bswap x), 16) if the high 16 bits
of x are zero. This optimizes rev + lsr 16 to rev16.
rdar://
10750814
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151230
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 23 Feb 2012 01:52:38 +0000 (01:52 +0000)]
PostRASched: Convert physreg def/use tracking to Jakob's SparseSet.
Added array subscript to SparseSet for convenience.
Slight reorg to make it easier to manage the def/use sets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151228
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 23 Feb 2012 01:22:15 +0000 (01:22 +0000)]
Handle regmasks in FixupKills.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151226
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 23 Feb 2012 01:19:06 +0000 (01:19 +0000)]
Optimize a couple of common patterns involving conditional moves where the false
value is zero. Instead of a cmov + op, issue an conditional op instead. e.g.
cmp r9, r4
mov r4, #0
moveq r4, #1
orr lr, lr, r4
should be:
cmp r9, r4
orreq lr, lr, #1
That is, optimize (or x, (cmov 0, y, cond)) to (or.cond x, y). Similarly extend
this to xor as well as (and x, (cmov -1, y, cond)) => (and.cond x, y).
It's possible to extend this to ADD and SUB but I don't think they are common.
rdar://
8659097
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151224
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 23 Feb 2012 01:15:26 +0000 (01:15 +0000)]
Handle regmasks in CriticalAntiDepBreaker.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151223
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 23 Feb 2012 01:13:32 +0000 (01:13 +0000)]
Track reserved registers separately from RegsAvailable.
The bulk masking operations from register mask operands don't account
for reserved registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151222
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 22 Feb 2012 23:49:50 +0000 (23:49 +0000)]
MC: Fix the MCNullStreamer which was broken in r147763.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151213
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 22 Feb 2012 22:52:52 +0000 (22:52 +0000)]
Don't compute latencies for regmask operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151211
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 22 Feb 2012 22:50:14 +0000 (22:50 +0000)]
Handle regmasks in RegisterScavenging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151210
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 22 Feb 2012 21:59:00 +0000 (21:59 +0000)]
misched: Use SparseSet for VRegDegs for constant time clear().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151205
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 22 Feb 2012 21:11:47 +0000 (21:11 +0000)]
Allow the use of an alternate symbol for calculating a function's size.
The standard function epilog includes a .size directive, but ppc64 uses
an alternate local symbol to tag the actual start of each function.
Until recently, binutils accepted the .size directive as:
.size test1, .Ltmp0-test1
however, using this directive with recent binutils will result in the error:
.size expression for XXX does not evaluate to a constant
so we must use the label which actually tags the start of the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151200
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 22 Feb 2012 19:38:03 +0000 (19:38 +0000)]
Remove bad comma from .el file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151189
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 22 Feb 2012 19:17:20 +0000 (19:17 +0000)]
libclc is now dual licensed, Tobias and Peter own their respective subprojects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151186
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Wed, 22 Feb 2012 19:06:13 +0000 (19:06 +0000)]
Properly emit _fltused with FastISel. Refactor to share code with SDAG.
Patch by Joe Groff!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151183
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 22 Feb 2012 18:34:49 +0000 (18:34 +0000)]
Comment from code review
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151178
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 22 Feb 2012 17:25:00 +0000 (17:25 +0000)]
Remove extra semi-colons.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151169
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 22 Feb 2012 16:50:46 +0000 (16:50 +0000)]
80 col.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151167
91177308-0d34-0410-b5e6-
96231b3b80d8
Sirish Pande [Wed, 22 Feb 2012 16:45:10 +0000 (16:45 +0000)]
Efficient pattern for store truncate. Patch by Evandro Menezes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151166
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Wed, 22 Feb 2012 16:09:41 +0000 (16:09 +0000)]
Add Foreach Loop
Add some data structures to represent for loops. These will be
referenced during object processing to do any needed iteration and
instantiation.
Add foreach keyword support to the lexer.
Add a mode to indicate that we're parsing a foreach loop. This allows
the value parser to early-out when processing the foreach value list.
Add a routine to parse foreach iteration declarations. This is
separate from ParseDeclaration because the type of the named value
(the iterator) doesn't match the type of the initializer value (the
value list). It also needs to add two values to the foreach record:
the iterator and the value list.
Add parsing support for foreach.
Add the code to process foreach loops and create defs based
on iterator values.
Allow foreach loops to be matched at the top level.
When parsing an IDValue check if it is a foreach loop iterator for one
of the active loops. If so, return a VarInit for it.
Add Emacs keyword support for foreach.
Add VIM keyword support for foreach.
Add tests to check foreach operation.
Add TableGen documentation for foreach.
Support foreach with multiple objects.
Support non-braced foreach body with one object.
Do not require types for the foreach declaration. Assume the iterator
type from the iteration list element type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151164
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 22 Feb 2012 16:01:54 +0000 (16:01 +0000)]
Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151163
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 22 Feb 2012 13:42:11 +0000 (13:42 +0000)]
Remove static ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151160
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 22 Feb 2012 11:32:54 +0000 (11:32 +0000)]
Support was removed from LLVM's MIPS backend for the PSP variant of that
chip in r139383, and the PSP components of the triple are really
annoying to parse. Let's leave this chapter behind. There is no reason
to expect LLVM to see a PSP-related triple these days, and so no
reasonable motivation to support them.
It might be reasonable to prune a few of the older MIPS triple forms in
general, but as those at least cause no burden on parsing (they aren't
both a chip and an OS!), I'm happy to leave them in for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151156
91177308-0d34-0410-b5e6-
96231b3b80d8