Stepan Dyatkovskiy [Wed, 11 Jul 2012 21:02:57 +0000 (21:02 +0000)]
Fixed diff comparison.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160076
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Wed, 11 Jul 2012 20:59:20 +0000 (20:59 +0000)]
In MemoryBuffer::getOpenFile() don't verify that the mmap'ed
file buffer is null-terminated.
If the file is smaller than we thought, mmap will not allow dereferencing
past the pages that are enough to cover the actual file size,
even though we asked for a larger address range.
rdar://
11612916
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160075
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Jul 2012 20:51:50 +0000 (20:51 +0000)]
In register classes in MipsRegisterInfo.td, list the registers in ascending
order of binary encoding.
Patch by Vladimir Medic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160073
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 11 Jul 2012 19:58:38 +0000 (19:58 +0000)]
[x86 fast-isel] Per discussion with Eric, add all cases to switch with verbose
comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160069
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Jul 2012 19:50:46 +0000 (19:50 +0000)]
Test case for r160036.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160067
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Wed, 11 Jul 2012 19:35:12 +0000 (19:35 +0000)]
X86: Update to peephole optimization to move Movr0 before (Sub, Cmp) pair.
When Movr0 is between sub and cmp, we move Movr0 before sub if it enables
removal of Cmp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160066
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Jul 2012 19:32:27 +0000 (19:32 +0000)]
Implement MipsTargetLowering::LowerSELECT_CC to custom lower SELECT_CC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160064
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Wed, 11 Jul 2012 18:55:07 +0000 (18:55 +0000)]
InstrEmitter::EmitSubregNode() optimize extract_subreg in this case:
r1025 = s/zext r1024, 4
r1026 = extract_subreg r1025, 4
to a copy:
r1026 = copy r1024
This is correct. However it uses TII->isCoalescableExtInstr() which can return
true for instructions which essentially does a sext_in_reg so this can end up
with an illegal copy where the source and destination register classes do not
match. Add a check to avoid it. Sorry, no test case possible at this time.
rdar://
11849816
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160059
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Jul 2012 18:31:59 +0000 (18:31 +0000)]
PR13326: Fix a subtle edge case in the udiv -> magic multiply generator.
This caused 6 of 65k possible 8 bit udivs to be wrong.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160058
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Wed, 11 Jul 2012 17:34:12 +0000 (17:34 +0000)]
test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160056
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 11 Jul 2012 17:23:17 +0000 (17:23 +0000)]
[x86 fast-isel] Rather then call llvm_unreachable() have fast-isel fall back
to Selection DAG isel. Patch by Andrew Kaylor <andrew.kaylor@intel.com>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160055
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 11 Jul 2012 13:27:05 +0000 (13:27 +0000)]
When ext-loading and trunc-storing vectors to memory, on x86 32bit systems, allow loads/stores of 64bit values from xmm registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160044
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 11 Jul 2012 11:02:16 +0000 (11:02 +0000)]
Rename many of the Tmp1, Tmp2, Tmp3 variables to names such as Chain, Value, Ptr, etc.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160042
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Jul 2012 09:39:04 +0000 (09:39 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160040
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Wed, 11 Jul 2012 08:52:09 +0000 (08:52 +0000)]
Refactor the DAG Legalizer by extracting the legalization of
Load and Store nodes into their own functions.
No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160037
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 11 Jul 2012 06:38:55 +0000 (06:38 +0000)]
Only apply the SETCC+SITOFP -> SELECTCC optimization when the SETCC returns an MVT::i1, i.e. before type legalization.
This is a speculative fix for a problem on Mips reported by Akira Hatanaka.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160036
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Wed, 11 Jul 2012 00:53:32 +0000 (00:53 +0000)]
Lower RETURNADDR node in Mips backend.
Patch by Sasa Stankovic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160031
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 10 Jul 2012 22:41:20 +0000 (22:41 +0000)]
Mips specific inline asm operand modifier 'L'.
Low order register of a double word register operand. Operands
are defined by the name of the variable they are marked with in
the inline assembler code. This is a way to specify that the
operand just refers to the low order register for that variable.
It is the opposite of modifier 'D' which specifies the high order
register.
Example:
main()
{
long long ll_input = 0x1111222233334444LL;
long long ll_val = 3;
int i_result = 0;
__asm__ __volatile__(
"or %0, %L1, %2"
: "=r" (i_result)
: "r" (ll_input), "r" (ll_val));
}
Which results in:
lui $2, %hi(_gp_disp)
addiu $2, $2, %lo(_gp_disp)
addiu $sp, $sp, -8
addu $2, $2, $25
sw $2, 0($sp)
lui $2, 13107
ori $3, $2, 17476 <-- Low 32 bits of ll_input
lui $2, 4369
ori $4, $2, 8738 <-- High 32 bits of ll_input
addiu $5, $zero, 3 <-- Low 32 bits of ll_val
addiu $2, $zero, 0 <-- High 32 bits of ll_val
#APP
or $3, $4, $5 <-- or i_result, high 32 ll_input, low 32 of ll_val
#NO_APP
addiu $sp, $sp, 8
jr $ra
If not direction is done for the long long for 32 bit variables results
in using the low 32 bits as ll_val shows.
There is an existing bug if 'L' or 'D' is used for the destination register
for 32 bit long longs in that the target value will be updated incorrectly
for the non-specified part unless explicitly set within the inline asm code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160028
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 10 Jul 2012 22:39:56 +0000 (22:39 +0000)]
Require and preserve LoopInfo for early if-conversion.
It will surely be needed by heuristics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160027
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jul 2012 22:25:21 +0000 (22:25 +0000)]
Teach the LiveInterval::join function to use the fast merge algorithm,
generalizing its implementation sufficiently to support this value
number scenario as well.
This cuts out another significant performance hit in large functions
(over 10k basic blocks, etc), especially those with "natural" CFG
structures.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160026
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 10 Jul 2012 22:18:23 +0000 (22:18 +0000)]
Run early if-conversion in domtree post-order.
This ordering allows nested if-conversion without using a work list, and
it makes it possible to update the dominator tree on the fly as well.
Any erased basic blocks will always be dominated by the current
post-order position, so the domtree can be pruned without invalidating
the iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160025
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Jul 2012 18:27:15 +0000 (18:27 +0000)]
Move [get|set]BasePtrStackAdjustment() from MachineFrameInfo to
X86MachineFunctionInfo as this is currently only used by X86. If this ever
becomes an issue on another arch (e.g., ARM) then we can hoist it back out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160009
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Jul 2012 17:57:00 +0000 (17:57 +0000)]
Add newline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160006
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Jul 2012 17:49:39 +0000 (17:49 +0000)]
Add test case accidentally omitted from r160002.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160004
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 10 Jul 2012 17:45:53 +0000 (17:45 +0000)]
Add support for dynamic stack realignment in the presence of dynamic allocas on
X86. Basically, this is a reapplication of r158087 with a few fixes.
Specifically, (1) the stack pointer is restored from the base pointer before
popping callee-saved registers and (2) in obscure cases (see comments in patch)
we must cache the value of the original stack adjustment in the prologue and
apply it in the epilogue.
rdar://
11496434
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160002
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jul 2012 15:41:33 +0000 (15:41 +0000)]
Fix a bug where I didn't test for an empty range before inspecting the
back of it.
I don't have anything even remotely close to a test case for this. It
only broke two build bots, both of them doing bootstrap builds, one of
them a dragonegg bootstrap. It doesn't break for me when I bootstrap
either. It doesn't reproduce every time or on many machines during the
bootstrap. Many thanks to Duncan Sands who got the exact command (and
stage of the bootstrap) which failed on the dragonegg bootstrap and
managed to get it to trigger under valgrind with debug symbols. The fix
was then found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159993
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 10 Jul 2012 13:25:08 +0000 (13:25 +0000)]
Improve the loading of load-anyext vectors by allowing the codegen to load
multiple scalars and insert them into a vector. Next, we shuffle the elements
into the correct places, as before.
Also fix a small dagcombine bug in SimplifyBinOpWithSameOpcodeHands, when the
migration of bitcasts happened too late in the SelectionDAG process.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159991
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Tue, 10 Jul 2012 12:51:09 +0000 (12:51 +0000)]
Fix instruction description of VMOV (between two ARM core registers and two single-precision resiters) (and do it properly this time!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159989
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 10 Jul 2012 06:38:33 +0000 (06:38 +0000)]
Reverse assembler/disassembler operand order for gather instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159983
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jul 2012 05:16:17 +0000 (05:16 +0000)]
Add an efficient merge operation to LiveInterval and use it to avoid
quadratic behavior when performing pathological merges. Fixes the core
element of PR12652.
There is only one user of addRangeFrom left: join. I'm hoping to
refactor further in a future patch and have join use this merge
operation as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159982
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 10 Jul 2012 05:06:03 +0000 (05:06 +0000)]
Teach LiveIntervals how to verify themselves and start using it in some
of the trick merge routines. This adds a layer of testing that was
necessary when implementing more efficient (and complex) merge logic for
this datastructure.
No functionality changed here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159981
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 10 Jul 2012 00:51:13 +0000 (00:51 +0000)]
ARM: Allow more flexible patterns in NEON formats.
Some NEON instructions want to match against normal SDNodes for some
operand types and Intrinsics for others. For example, CTLZ. To enable this,
switch from explicitly requiring Intrinsic on the class templates to using
SDPatternOperator instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159974
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 10 Jul 2012 00:51:11 +0000 (00:51 +0000)]
Allow intrinsics to be used in place of node matchables.
TableGen has support for using an intrinics name directly in a DAG,
but this breaks down when referring to just a node, as that's
handled initializer list stuff entirely via subclassing in the
parser. That is, using an instrinsic like "(int_my_intrinsic ...)"
works fine. Using it standalone for parameterizing the operator
in such a DAG does not.
Fixing this is simple enough, as we simply declare Intrinsic
as deriving from SDPatternOperator, which is the class name
intended for exactly this purpose in TargetSelectionDAG.td.
When the intrinsic is actually used in the DAG pattern, it will
be recognized and expanded to an intrinsic_wo_chain (et. al.)
just like when it's used directly.
Incoming ARM NEON cleanup based on this and a bit of functionality
improvement after that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159973
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 10 Jul 2012 00:19:06 +0000 (00:19 +0000)]
Make register Mips::RA allocatable if not in mips16 mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159971
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 9 Jul 2012 23:51:20 +0000 (23:51 +0000)]
Delete code for folding undefs in ScalarEvolution. It's invalid in
obscure ways, and it isn't actually important in the real world.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159969
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 9 Jul 2012 20:43:34 +0000 (20:43 +0000)]
Revert r159938 (and r159945) to appease the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159960
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 9 Jul 2012 20:43:03 +0000 (20:43 +0000)]
Machine model: allow itineraries to be shared by different processor models.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159959
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 9 Jul 2012 20:43:01 +0000 (20:43 +0000)]
indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159958
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Mon, 9 Jul 2012 20:31:12 +0000 (20:31 +0000)]
Teach the DAG combiner to turn sitofp/uitofp from i1 into a conditional move, since there are only two possible values.
Previously, this would become an integer extension operation, followed by a real integer->float conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159957
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Mon, 9 Jul 2012 18:57:12 +0000 (18:57 +0000)]
X86: implement functions to analyze & synthesize CMOV|SET|Jcc
getCondFromSETOpc, getCondFromCMovOpc, getSETFromCond, getCMovFromCond
No functional change intended.
If we want to update the condition code of CMOV|SET|Jcc, we first analyze the
opcode to get the condition code, then update the condition code, finally
synthesize the new opcode form the new condition code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159955
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Mon, 9 Jul 2012 18:46:47 +0000 (18:46 +0000)]
Reapply r158846.
Access mips register classes via MCRegisterInfo's functions instead of via the
TargetRegisterClasses defined in MipsGenRegisterInfo.inc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159953
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Mon, 9 Jul 2012 18:38:20 +0000 (18:38 +0000)]
instcombine: merge the functions that remove dead allocas and dead mallocs/callocs/...
This patch removes ~70 lines in InstCombineLoadStoreAlloca.cpp and makes both functions a bit more aggressive than before :)
In theory, we can be more aggressive when removing an alloca than a malloc, because an alloca pointer should never escape, but we are not taking advantage of this anyway
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159952
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Mon, 9 Jul 2012 18:30:56 +0000 (18:30 +0000)]
Some formatting to keep Clang happy
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159948
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Mon, 9 Jul 2012 18:20:02 +0000 (18:20 +0000)]
Oops - correct broken disassembly for VMOV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159945
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Mon, 9 Jul 2012 16:41:33 +0000 (16:41 +0000)]
Fix instruction description of VMOV (between two ARM core registers and two single-precision resiters)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159938
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Mon, 9 Jul 2012 16:31:14 +0000 (16:31 +0000)]
Prevent ARM assembler from losing a right shift by #32 applied to a register
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159937
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Mon, 9 Jul 2012 16:14:28 +0000 (16:14 +0000)]
Spelling!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159936
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Barton [Mon, 9 Jul 2012 16:12:24 +0000 (16:12 +0000)]
Teach the assembler to use the narrow thumb encodings of various three-register dp instructions where permissable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159935
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 8 Jul 2012 19:47:51 +0000 (19:47 +0000)]
Remove some trivial copy ctors so the classes become trivially copyable and get the optimized SmallVector implementation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159916
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 8 Jul 2012 12:06:35 +0000 (12:06 +0000)]
SmallVector: Make use of move semantics to speed up moving objects in erase() and insert()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159914
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jul 2012 04:00:00 +0000 (04:00 +0000)]
I'm introducing a new machine model to simultaneously allow simple
subtarget CPU descriptions and support new features of
MachineScheduler.
MachineModel has three categories of data:
1) Basic properties for coarse grained instruction cost model.
2) Scheduler Read/Write resources for simple per-opcode and operand cost model (TBD).
3) Instruction itineraties for detailed per-cycle reservation tables.
These will all live side-by-side. Any subtarget can use any
combination of them. Instruction itineraries will not change in the
near term. In the long run, I expect them to only be relevant for
in-order VLIW machines that have complex contraints and require a
precise scheduling/bundling model. Once itineraries are only actively
used by VLIW-ish targets, they could be replaced by something more
appropriate for those targets.
This tablegen backend rewrite sets things up for introducing
MachineModel type #2: per opcode/operand cost model.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159891
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jul 2012 03:59:51 +0000 (03:59 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159890
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 7 Jul 2012 03:59:48 +0000 (03:59 +0000)]
Tweak spelling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159889
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 7 Jul 2012 03:34:46 +0000 (03:34 +0000)]
X86: Fix optimizeCompare to correctly check safe condition.
It is safe if EFLAGS is killed or re-defined.
When we are done with the basic block, check whether EFLAGS is live-out.
Do not optimize away cmp if EFLAGS is live-out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159888
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 7 Jul 2012 03:12:28 +0000 (03:12 +0000)]
LLVMConfig.cmake.in: Quote around @LLVM_INSTALL_PREFIX@, or it would not accept whitespace paths.
Thanks to Kai.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159887
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 7 Jul 2012 00:52:35 +0000 (00:52 +0000)]
Use the DebugInfo wrappers instead of mucking about with the MDNode directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159881
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 23:43:12 +0000 (23:43 +0000)]
Print the name last.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159879
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jul 2012 23:13:38 +0000 (23:13 +0000)]
Fix the naming of ensureAlignment. Per the coding standard function names
should be camel case, and start with a lower case letter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159877
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 6 Jul 2012 23:09:25 +0000 (23:09 +0000)]
teach instcombine to remove allocated buffers even if there are stores, memcpy/memmove/memset, and objectsize users.
This means we can do cheap DSE for heap memory.
Nothing is done if the pointer excapes or has a load.
The churn in the tests is mostly due to objectsize, since we want to make sure we
don't delete the malloc call before evaluating the objectsize (otherwise it becomes -1/0)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159876
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 6 Jul 2012 23:06:47 +0000 (23:06 +0000)]
Since SmallMap was removed in r158644, remove documentation in ProgrammersManual.html.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159874
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 23:06:16 +0000 (23:06 +0000)]
Check if it's a scope last, because several things are scopes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159873
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 6 Jul 2012 21:52:04 +0000 (21:52 +0000)]
ARM: Add test cleanup entry to the README.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159864
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 6 Jul 2012 20:16:48 +0000 (20:16 +0000)]
revert r159851.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159854
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 6 Jul 2012 19:29:11 +0000 (19:29 +0000)]
Reapply r158846.
Include file MipsGenRegisterInfo.inc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159851
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 19:12:31 +0000 (19:12 +0000)]
Add a print method to the ObjC property object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159848
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 17:49:19 +0000 (17:49 +0000)]
Remove trailing comma in array initialization list.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159843
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 17:47:36 +0000 (17:47 +0000)]
Remove unnecessary 'llvm::'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159842
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 17:46:28 +0000 (17:46 +0000)]
Remove unnecessary 'llvm::'.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159841
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jul 2012 17:44:22 +0000 (17:44 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159839
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Fri, 6 Jul 2012 17:36:20 +0000 (17:36 +0000)]
X86: peephole optimization to remove cmp instruction
For each Cmp, we check whether there is an earlier Sub which make Cmp
redundant. We handle the case where SUB operates on the same source operands as
Cmp, including the case where the two source operands are swapped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159838
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jul 2012 17:33:39 +0000 (17:33 +0000)]
[fast-isel] Tell fast-isel to do nothing with the new donothing intrinsic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159837
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 6 Jul 2012 17:15:03 +0000 (17:15 +0000)]
Update getFunction parameter documentation. Fixes PR13268.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159835
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 6 Jul 2012 16:42:25 +0000 (16:42 +0000)]
Revert r159789.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159834
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 6 Jul 2012 15:55:39 +0000 (15:55 +0000)]
llvm/include/llvm/CMakeLists.txt: Cut dependency to intrinsics_gen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159831
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 6 Jul 2012 14:43:16 +0000 (14:43 +0000)]
Attempt to fix windows buildbots. Patch by James Benton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159826
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 6 Jul 2012 12:12:39 +0000 (12:12 +0000)]
test/CodeGen/X86/sext-setcc-self.ll: Mark it as XFAIL: cygwin,mingw32,win32. Investigating.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159820
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 6 Jul 2012 11:12:44 +0000 (11:12 +0000)]
Revert r159804, "[arm-fast-isel] Add support for vararg function calls."
It broke LLVM :: CodeGen/Thumb2/large-call.ll on several hosts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159817
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Samsonov [Fri, 6 Jul 2012 08:45:08 +0000 (08:45 +0000)]
Fix PR13202 and a regtest.
DwarfDebug class could generate the same (inlined) DIVariable twice:
1) when trying to find abstract debug variable for a concrete inlined instance.
2) when explicitly collecting info for variables that were optimized out.
This change makes sure that this duplication won't happen and makes
Clang pass "gdb.opt/inline-locals" test from gdb testsuite.
Reviewed by Eric Christopher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159811
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 6 Jul 2012 05:51:50 +0000 (05:51 +0000)]
Sphinxify the CMake document.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159806
91177308-0d34-0410-b5e6-
96231b3b80d8
Jush Lu [Fri, 6 Jul 2012 03:02:37 +0000 (03:02 +0000)]
[arm-fast-isel] Add support for vararg function calls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159804
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Fri, 6 Jul 2012 02:44:22 +0000 (02:44 +0000)]
Changes per review of commit 159787
Mips specific inline asm operand modifier D.
Comment changes and predicate change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159802
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 6 Jul 2012 02:35:57 +0000 (02:35 +0000)]
Untabify and move a function near similar functions dealing with struct
types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159801
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 6 Jul 2012 02:31:22 +0000 (02:31 +0000)]
Add some comments suggested in code review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159800
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Fri, 6 Jul 2012 00:25:39 +0000 (00:25 +0000)]
Enable new[] on llvm::BumpPtrAllocator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159789
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 5 Jul 2012 23:58:21 +0000 (23:58 +0000)]
Mips specific inline asm operand modifier D.
Print the second half of a double word operand.
The include list was cleaned up a bit as well.
Also the test case was modified to test for both
big and little patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159787
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 5 Jul 2012 22:30:42 +0000 (22:30 +0000)]
Fix an overzealous assertion. It is legitimate for a target to have multiple fixups on a single instruction that target the same byte, so long as their bit-offsets are coordinates appropriately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159785
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 5 Jul 2012 19:29:31 +0000 (19:29 +0000)]
test case for r159770.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159771
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 5 Jul 2012 19:26:38 +0000 (19:26 +0000)]
Enclose instruction rdhwr with directives, which are needed when target is
mips32 rev1 (the directives are emitted when target is mips32r2 too).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159770
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 5 Jul 2012 19:09:33 +0000 (19:09 +0000)]
Enable target dependent directive parsing to hook before standard parser in
AsmParser::ParseStatement.
Patch by Vladimir Medic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159768
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Thu, 5 Jul 2012 17:37:07 +0000 (17:37 +0000)]
add @llvm.donothing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159758
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Jul 2012 12:40:45 +0000 (12:40 +0000)]
Optimize extendIntervalEndTo a tiny bit by saving one call through the
vector erase. No functionality changed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159746
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Jul 2012 11:40:23 +0000 (11:40 +0000)]
Remove dead infrastructure for building DenseMaps with a SlotIndex as
the key -- they are now stored in an IntervalMap.
I noticed this while looking into PR12652.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159745
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Jul 2012 11:06:22 +0000 (11:06 +0000)]
Finish fixing the MachineOperand hashing, providing a nice modern
hash_value overload for MachineOperands. This addresses a FIXME
sufficient for me to remove it, and cleans up the code nicely too.
The important changes to the hashing logic:
- TargetFlags are now included in all of the hashes. These were complete
missed.
- Register operands have their subregisters and whether they are a def
included in the hash.
- We now actually hash all of the operand types. Previously, many
operand types were simply *dropped on the floor*. For example:
- Floating point immediates
- Large integer immediates (>64-bit)
- External globals!
- Register masks
- Metadata operands
- It removes the offset from the block-address hash; I'm a bit
suspicious of this, but isIdenticalTo doesn't consider the offset for
black addresses.
Any patterns involving these entities could have triggered extreme
slowdowns in MachineCSE or PHIElimination. Let me know if there are PRs
you think might be closed now... I'm looking myself, but I may miss
them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159743
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 5 Jul 2012 10:14:33 +0000 (10:14 +0000)]
All cases are covered, no need for a default. This deals with the
corresponding clang warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159742
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 5 Jul 2012 10:03:57 +0000 (10:03 +0000)]
The hash function for MI expressions, used by MachineCSE, is really
broken. This patch fixes the superficial problems which lead to the
intractably slow compile times reported in PR13225.
The specific issue is that we were failing to include the *offset* of
a global variable in the hash code. Oops. This would in turn cause all
MIs which were only distinguishable due to operating on different
offsets of a global variable to produce identical hash functions. In
some of the test cases attached to the PR I saw hash table activity
where there were O(1000) probes-per-lookup *on average*. A very few
entries were responsible for most of these probes.
There is still quite a bit more to do here. The ad-hoc layering of data
in MachineOperands makes them *extremely* brittle to hash correctly.
We're missing quite a few other cases, the only ones I've fixed here are
the specific MO types which were allowed through the assert() in
getOffset().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159741
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 5 Jul 2012 09:32:46 +0000 (09:32 +0000)]
Use the right kind of booleans: we were emitting 0/1 booleans, instead of 0/-1
booleans. Patch by James Benton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159739
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Thu, 5 Jul 2012 09:07:31 +0000 (09:07 +0000)]
[tsan] fix compile-time falilure found while building Chromium with tsan (tsan issue #3). A unit test will follow separately.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159736
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 5 Jul 2012 06:19:21 +0000 (06:19 +0000)]
Remove ParentMap. You can just ask the domnode for its parent. No functionality
change.
Move the "Not profitable, avoid CSE!" debug message next to where we fail the
check for profitability and use a different message for avoiding CSE due to
being in different register classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159729
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 23:53:27 +0000 (23:53 +0000)]
Make X86 call and return instructions non-variadic.
Function argument and return value registers aren't part of the
encoding, so they should be implicit operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159728
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 4 Jul 2012 23:53:23 +0000 (23:53 +0000)]
Allow trailing physreg RegisterSDNode operands on non-variadic instructions.
Also allow trailing register mask operands on non-variadic both
MachineSDNodes and MachineInstrs.
The extra physreg RegisterSDNode operands are added to the MI as
<imp-use> operands. This makes it possible to have non-variadic call
instructions.
Call and return instructions really are non-variadic, the argument
registers should only be used implicitly - they are not part of the
encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159727
91177308-0d34-0410-b5e6-
96231b3b80d8