OSDN Git Service
Eric Christopher [Tue, 20 Mar 2012 01:07:53 +0000 (01:07 +0000)]
Add another debugging statement here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153072
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 20 Mar 2012 01:07:47 +0000 (01:07 +0000)]
Use lookUpRegForValue here instead of duplicating the code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2012 23:42:11 +0000 (23:42 +0000)]
Fix two bugpoint bugs:
1) opt is not usually in the same path as the target program. Even for
the bugpoint as a standalone app, it should be more portable to search
in PATH, isn't it?
2) bugpoint driver accounts opt plugins, but does not list them in the
final output command.
Patch by Dmitry Mikushin!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153066
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2012 23:40:48 +0000 (23:40 +0000)]
fix PR12301 - llvm-bcanalyze should print to stdout, not stderr (except for errors).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153065
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 19 Mar 2012 23:38:12 +0000 (23:38 +0000)]
f16 FDIV can now be legalized by promoting to f32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153064
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 19 Mar 2012 23:31:01 +0000 (23:31 +0000)]
fix a build failure with libc++
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153063
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 19 Mar 2012 21:32:32 +0000 (21:32 +0000)]
ARM branch relaxation for unconditional t1 branches.
rdar://
11059157
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153055
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 19 Mar 2012 20:39:53 +0000 (20:39 +0000)]
ARM assembly, accept optional '#' on lane index number.
rdar://
11057160
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153053
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 19 Mar 2012 20:27:37 +0000 (20:27 +0000)]
[Object/COFF]: Expose getSectionContents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153051
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Mon, 19 Mar 2012 20:27:15 +0000 (20:27 +0000)]
[Object/COFF]: Expose getSectionName.
Also add some documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153050
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Mon, 19 Mar 2012 19:19:50 +0000 (19:19 +0000)]
Perform mul combine when multiplying wiht negative constants.
Patch by Weiming Zhao!
This fixes PR12212
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153049
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 19 Mar 2012 18:38:38 +0000 (18:38 +0000)]
Add an option to the MI scheduler to cut off scheduling after a fixed number of
instructions have been scheduled. Handy for tracking down scheduler bugs, or
bugs exposed by scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153045
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Mon, 19 Mar 2012 16:40:35 +0000 (16:40 +0000)]
[asan] don't emit __asan_mapping_offset/__asan_mapping_scale by default -- they are currently used only for experiments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153040
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 19 Mar 2012 16:16:03 +0000 (16:16 +0000)]
llvm/test/DebugInfo: Move two tests to DebugInfo/X86. They are X86-dependent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153038
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 19 Mar 2012 15:35:44 +0000 (15:35 +0000)]
Fix DAG combine which creates illegal vector shuffles. Patch by Heikki Kultala.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153035
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Mon, 19 Mar 2012 14:10:12 +0000 (14:10 +0000)]
This patch adds X86 instruction itineraries for non-pseudo opcodes in
X86InstrCompiler.td.
It also adds –mcpu-generic to the legalize-shift-64.ll test so the test
will pass if run on an Intel Atom CPU, which would otherwise
produce an instruction schedule which differs from that which the test expects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153033
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Mon, 19 Mar 2012 00:43:34 +0000 (00:43 +0000)]
Add a note for -ffast-math optimization of vector norm.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153031
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 18 Mar 2012 23:45:14 +0000 (23:45 +0000)]
Make the formatting of this file more consistent, and fix the 80-columns
violations I introduced. Also sort some of the instructions to get
a more consistent ordering.
Suggestions on still better / more consistent formatting would be
welcome. I'm actually tempted to use a macro to define all of the
delegate methods...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153030
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 18 Mar 2012 23:31:28 +0000 (23:31 +0000)]
Teach InstVisitor about the UnaryInstruction layer in the instruction
type hierarchy. I wanted to use this for the inline cost rewrite, and
found it was missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153029
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 18 Mar 2012 23:28:48 +0000 (23:28 +0000)]
Factor out the multiply analysis code in ComputeMaskedBits and apply it to the
overflow checking multiply intrinsic as well.
Add a test for this, updating the test from grep to FileCheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153028
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 18 Mar 2012 22:50:10 +0000 (22:50 +0000)]
isCommutedMOVLMask should only look at 128-bit vectors to match isMOVLMask.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153027
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 18 Mar 2012 09:35:50 +0000 (09:35 +0000)]
This clause (although matching parts of the implementation) can't be correct.
Thanks to Eli for noticing the discrepancy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153011
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 17 Mar 2012 20:22:57 +0000 (20:22 +0000)]
CriticalAntiDepBreaker: Replace a SmallSet of regs with a much denser BitVector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152999
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 18:46:09 +0000 (18:46 +0000)]
Reorder includes in Target backends to following coding standards. Remove some superfluous forward declarations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152997
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 17 Mar 2012 17:03:45 +0000 (17:03 +0000)]
MachineInstr: Inline the fast path (non-bundle instruction) of hasProperty.
This is particularly helpful as both arguments tend to be constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152991
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 09:39:20 +0000 (09:39 +0000)]
Fix some copy and paste remnants of Cell and SPU in Hexagon files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152981
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 09:28:37 +0000 (09:28 +0000)]
Fix typo in file header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152980
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 09:24:09 +0000 (09:24 +0000)]
Pass TargetOptions to HexagonTargetMachine constructor by reference to match other targets and the base class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152979
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 17 Mar 2012 07:33:42 +0000 (07:33 +0000)]
Reorder includes to match coding standards. Fix an issue or two exposed by that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152978
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Sat, 17 Mar 2012 00:11:42 +0000 (00:11 +0000)]
MC asm parser macro argument count was wrong when empty.
evaluated to '1' when the argument list was empty (should be '0').
rdar://
11057257
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152967
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 16 Mar 2012 23:11:07 +0000 (23:11 +0000)]
Check if we can handle the arguments of a call (and therefore the call) in
fast-isel before emitting code. If the program bails after code was emitted,
then it could lead to the stack being adjusted more than once (two
CALLSEQ_BEGINs emitted) but being adjuste back only once after the call. This
leads to general badness and gnashing of teeth.
<rdar://problem/
11050630>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152959
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Fri, 16 Mar 2012 22:50:01 +0000 (22:50 +0000)]
Revert r152915. Chapuni's WinWaitReleased refactoring: It doesn't work for me
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152958
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 16 Mar 2012 22:34:37 +0000 (22:34 +0000)]
clarify the coding standards a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152957
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 22:18:29 +0000 (22:18 +0000)]
ARM fix silly typo in optional operand alias.
rdar://
11065671
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152954
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 21:06:13 +0000 (21:06 +0000)]
ARM divided syntax fmrx/fmxr mnemonics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152946
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 20:48:38 +0000 (20:48 +0000)]
ARM ldm/stm register lists can be out of order.
It's not a good style idea, as the registers will be laid down in memory in
numerical order, not the order they're in the list, but it's legal. vldm/vstm
are stricter.
rdar://
11064740
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152943
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 16 Mar 2012 18:20:54 +0000 (18:20 +0000)]
Revert r152907.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152935
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 16 Mar 2012 17:38:19 +0000 (17:38 +0000)]
ScheduleDAGInstrs: When adding uses we add them into a set that's empty at the beginning, no need to maintain another set for the added regs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152934
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 16 Mar 2012 16:39:27 +0000 (16:39 +0000)]
Limit the number of memory operands in MachineInstr to 2^16 and store the number in padding.
Saves one machine word on MachineInstr (88->80 bytes on x86_64, 48->44 on i386).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152930
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 16 Mar 2012 15:46:47 +0000 (15:46 +0000)]
CriticalAntiDepBreaker: BasicBlock::size is an expensive operation, reuse the cached value.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152927
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 16 Mar 2012 10:48:10 +0000 (10:48 +0000)]
lit/TestRunner.py: [Win32] Check all opened_files[] released, rather than (obsoleted) written_files[].
In previous case,
RUN: foo -o %t
RUN: FileCheck < %t
RUN: bar -o %t
2nd read handle might prevent manipulation of 3rd %t in bar, to remove and rename.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152916
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 16 Mar 2012 10:48:03 +0000 (10:48 +0000)]
lit/TestRunner.py: [Win32] Rework WinWaitReleased().
We can simply confirm the handle released to open it with EXCLUSIVE. Attempting renaming was bad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152915
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 16 Mar 2012 07:40:08 +0000 (07:40 +0000)]
The alignment of the pointer part of the store instruction may have an
alignment. If that's the case, then we want to make sure that we don't increase
the alignment of the store instruction. Because if we increase it to be "more
aligned" than the pointer, code-gen may use instructions which require a greater
alignment than the pointer guarantees.
<rdar://problem/
11043589>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152907
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Mar 2012 06:52:56 +0000 (06:52 +0000)]
More const-correcting of FixedLenDecoderEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152906
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 16 Mar 2012 06:10:15 +0000 (06:10 +0000)]
Rip out support for 'llvm.noinline'. This thing has a strange history...
It was added in 2007 as the first cut at supporting no-inline
attributes, but we didn't have function attributes of any form at the
time. However, it was added without any mention in the LangRef or other
documentation.
Later on, in 2008, Devang added function notes for 'inline=never' and
then turned them into proper function attributes. From that point
onward, as far as I can tell, the world moved on, and no one has touched
'llvm.noinline' in any meaningful way since.
It's time has now come. We have had better mechanisms for doing this for
a long time, all the frontends I'm aware of use them, and this is just
holding back progress. Given that it was never a documented feature of
the IR, I've provided no auto-upgrade support. If people know of real,
in-the-wild bitcode that relies on this, yell at me and I'll add it, but
I *seriously* doubt anyone cares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152904
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 16 Mar 2012 06:10:13 +0000 (06:10 +0000)]
Start removing the use of an ad-hoc 'never inline' set and instead
directly query the function information which this set was representing.
This simplifies the interface of the inline cost analysis, and makes the
always-inline pass significantly more efficient.
Previously, always-inline would first make a single set of every
function in the module *except* those marked with the always-inline
attribute. It would then query this set at every call site to see if the
function was a member of the set, and if so, refuse to inline it. This
is quite wasteful. Instead, simply check the function attribute directly
when looking at the callsite.
The normal inliner also had similar redundancy. It added every function
in the module with the noinline attribute to its set to ignore, even
though inside the cost analysis function we *already tested* the
noinline attribute and produced the same result.
The only tricky part of removing this is that we have to be able to
correctly remove only the functions inlined by the always-inline pass
when finalizing, which requires a bit of a hack. Still, much less of
a hack than the set of all non-always-inline functions was. While I was
touching this function, I switched a heavy-weight set to a vector with
sort+unique. The algorithm already had a two-phase insert and removal
pattern, we were just needlessly paying the uniquing cost on every
insert.
This probably speeds up some compiles by a small amount (-O0 compiles
with lots of always-inline, so potentially heavy libc++ users), but I've
not tried to measure it.
I believe there is no functional change here, but yell if you spot one.
None are intended.
Finally, the direction this is going in is to greatly simplify the
inline cost query interface so that we can replace its implementation
with a much more clever one. Along the way, all the APIs get simplified,
so it seems incrementally good.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152903
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Mar 2012 05:58:09 +0000 (05:58 +0000)]
Const-correct the FixedLenDecoderEmitter. Pass a few things by const reference instead of value to avoid some copying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152899
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Fri, 16 Mar 2012 05:51:52 +0000 (05:51 +0000)]
Pull the implementation of the code metrics out of the inline cost
analysis implementation. The header was already separated. Also cleanup
all the comments in the header to follow a nice modern doxygen form.
There is still plenty of cruft here, but some of that will fall out in
subsequent refactorings and this was an easy step in the right
direction. No functionality changed here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152898
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 16 Mar 2012 05:04:25 +0000 (05:04 +0000)]
misched: add DAG edges from vreg defs to ExitSU.
These edges are not really necessary, but it is consistent with the
way we currently create physreg edges. Scheduler heuristics that
expect a DAG edge to the block terminator could benefit from this
change. Although in the future I hope we have a better mechanism for
modeling latency across scheduling regions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152895
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 16 Mar 2012 03:16:56 +0000 (03:16 +0000)]
LSR fix: Add isSimplifiedLoopNest to IVUsers analysis.
Only record IVUsers that are dominated by simplified loop
headers. Otherwise SCEVExpander will crash while looking for a
preheader.
I previously tried to work around this in LSR itself, but that was
insufficient. This way, LSR can continue to run if some uses are not
in simple loops, as long as we don't attempt to analyze those users.
Fixes <rdar://problem/
11049788> Segmentation fault: 11 in LoopStrengthReduce
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152892
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Mar 2012 01:19:24 +0000 (01:19 +0000)]
Spacing fixes. Mostly aligning arguments that spilled onto next line with the opening parenthese instead of 2 spaces in.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152889
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 16 Mar 2012 01:04:00 +0000 (01:04 +0000)]
Revert r152705, which reapplied r152486 as this appears to be causing failures
on our internal nightly testers. So, basically revert r152486 again.
Abbreviated original commit message:
Implement a more intelligent way of spilling uses across an invoke boundary.
It looks as if Chander's inlining work, r152737, exposed an issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152887
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 16 Mar 2012 00:56:01 +0000 (00:56 +0000)]
Remove unused field NumVariable from Filter class. Even it was needed the same result could be found with VariableInstructions.size(). Also fix some typos in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152885
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Fri, 16 Mar 2012 00:52:42 +0000 (00:52 +0000)]
In InstCombiner::visitOr, make sure we reverse the operand swap used for checking for or-of-xor operations after those checks; a later check expects that any constant will be in Op1. PR12234.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152884
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 00:45:58 +0000 (00:45 +0000)]
ARM optional operand on MRC/MCR assembly instructions.
rdar://
11058464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152883
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 16 Mar 2012 00:27:18 +0000 (00:27 +0000)]
ARM vmrs system registers mvfr0 and mvfr1 handling.
rdar://
11058464
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152881
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 16 Mar 2012 00:21:54 +0000 (00:21 +0000)]
Do the right thing on NULL uint64 fields.
Patch by Clemens Hammacher!
Fixes PR12243
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152880
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 16 Mar 2012 00:01:55 +0000 (00:01 +0000)]
Revert r152613 (and r152614), "Inline the d'tor and add an anchor instead." for workaround of g++-4.4's miscompilation.
It caused MSP430DAGToDAGISel::SelectIndexedBinOp() to be miscompiled.
When two ReplaceUses()'s are expanded as inline, vtable in base class is stored to latter (ISelUpdater)ISU.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152877
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 23:55:40 +0000 (23:55 +0000)]
For types with a parent of the compile unit make sure and emit
the DECL information.
rdar://
10855921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152876
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 15 Mar 2012 23:00:30 +0000 (23:00 +0000)]
Remove inadvertant commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152870
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 15 Mar 2012 22:54:20 +0000 (22:54 +0000)]
[fast-isel] Address Eli's comments for r152847. Specifically, add a test case
and still allow immediate encoding, just not with cmn.
rdar://
11038907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152869
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Thu, 15 Mar 2012 22:19:35 +0000 (22:19 +0000)]
docs: Update TestingGuide to change recommended practice to using LNT to drive
the test-suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152860
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 15 Mar 2012 21:40:23 +0000 (21:40 +0000)]
[fast-isel] Don't try to encode LONG_MIN using cmn instructions.
rdar://
11038907
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152847
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 15 Mar 2012 21:34:14 +0000 (21:34 +0000)]
ARM case-insensitive checking for APSR_nzcv.
rdar://
11056591
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152846
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:47 +0000 (21:33 +0000)]
We actually handle AllocaInst via getRegForValue below just fine.
Part of rdar://
8905263
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152845
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:44 +0000 (21:33 +0000)]
Add some debugging output into fast isel as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152844
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:41 +0000 (21:33 +0000)]
Add another debug statement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152843
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:39 +0000 (21:33 +0000)]
Tabs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152842
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 21:33:35 +0000 (21:33 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152841
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 15 Mar 2012 21:22:53 +0000 (21:22 +0000)]
Make MnemonicTable const again. That part of r152202 was OK.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152840
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Thu, 15 Mar 2012 20:48:18 +0000 (20:48 +0000)]
ARM aliases for pre-unified syntax fcmpz[sd] mnemonics.
rdar://
11056647
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152834
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 15 Mar 2012 20:44:06 +0000 (20:44 +0000)]
Don't assume all mnemonics fit in 64k.
We currently assume that all targets have less than 64k opcodes. We
shouldn't limit it further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152833
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Beaumont-Gay [Thu, 15 Mar 2012 20:24:29 +0000 (20:24 +0000)]
line endings
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152832
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 15 Mar 2012 20:14:42 +0000 (20:14 +0000)]
Type sizes and fields offsets inside structs are unsigned. This is a highly
theoretical fix since it only matters for types with >= 2^63 bits (!) and also
only matters if pointers have more than 64 bits, which is not supported anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152831
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Thu, 15 Mar 2012 18:49:02 +0000 (18:49 +0000)]
Use vmov.f32 to materialize f32 consts on ARM. This relaxes constraints on
register allocation by allowing all 32 D-registers to be used. Patch by Cameron
Zwarich.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152824
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 15 Mar 2012 18:05:57 +0000 (18:05 +0000)]
Revert r152202: "Use uint16_t to store InstrNameIndices in MCInstrInfo."
We cannot limit the concatenated instruction names to 64K. ARM is
already at 32K, and it is easy to imagine a target with more
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152817
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 15 Mar 2012 18:05:54 +0000 (18:05 +0000)]
Revert r152105: "Use uint16_t to store indices into string table"
This patch limited the concatenated register names to 64K which meant
that the total number of registers was many times less than 64K.
If any compilers actually enforce the 64K limit on string literals, and
it turns out to be a problem, we should fix that problem by not using
long string literals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152816
91177308-0d34-0410-b5e6-
96231b3b80d8
Kristof Beyls [Thu, 15 Mar 2012 17:50:29 +0000 (17:50 +0000)]
Fix VCVT decoding (between floating-point and fixed-point, Floating-point). Patch by Richard Barton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152814
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 15 Mar 2012 17:49:29 +0000 (17:49 +0000)]
Fix bug found by warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152812
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Thu, 15 Mar 2012 15:52:59 +0000 (15:52 +0000)]
Short term fix for pr12270 before we change dominates to handle unreachable
code.
While here, reduce indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152803
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 15 Mar 2012 11:19:41 +0000 (11:19 +0000)]
Use an iterator instead of calling .size() on the worklist every time, which is wasteful.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152794
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Thu, 15 Mar 2012 09:03:03 +0000 (09:03 +0000)]
Implement relocation-overflow behavior for PE/COFF.
This needs a test, but it will take some time to figure
out the best way to get an input that will produce > 2^16 relocs.
Patch by Graydon Hoare!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152787
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 15 Mar 2012 08:49:06 +0000 (08:49 +0000)]
When optimizing certain BUILD_VECTOR nodes into other BUILD_VECTOR nodes, add the new node into the work list because there is a potential for further optimizations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152784
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 15 Mar 2012 08:19:33 +0000 (08:19 +0000)]
Revert the removal of DW_AT_MIPS_linkage_name when we aren't putting
out the DW_AT_name. Older gdbs unfortunately still use it to
disambiguate member functions in templated classes (gdb.cp/templates.exp).
rdar://
11043421 (which is now deferred for a bit)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152782
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Thu, 15 Mar 2012 06:49:31 +0000 (06:49 +0000)]
Follow-up to r152620: restore JIT event listener tests to unittest/ExecutionEngine/JIT
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152780
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 15 Mar 2012 05:12:00 +0000 (05:12 +0000)]
Add a xform to the DAG combiner.
Transform:
(fsub x, (fadd x, y)) -> (fneg y) and
(fsub x, (fadd y, x)) -> (fneg y)
if 'unsafe math' is specified.
<rdar://problem/
7540295>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152777
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 01:37:56 +0000 (01:37 +0000)]
Remove the basic inliner. This was added in 2007, and hasn't really
changed since. No one was using it. It is yet another consumer of the
InlineCost interface that I'd like to change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152769
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 00:55:51 +0000 (00:55 +0000)]
Make the swap code here a bit more obvious what its doing... We're
essentially sorting the pair's arguments. I'd love to actually call sort
here, but I'm just not that crazy. ;]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152764
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 00:50:21 +0000 (00:50 +0000)]
Don't assume that the arguments are processed in some particular order.
This appears to not be the case with dragonegg at least in some
contexts. Hopefully will fix the bootstrap assert failure there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152763
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Thu, 15 Mar 2012 00:45:30 +0000 (00:45 +0000)]
[avx] Add patterns for VINSERTF128rm.
This results in things such as
vmovaps -96(%rbx), %xmm1
vinsertf128 $1, %xmm1, %ymm0, %ymm0
to be combined to
vinsertf128 $1, -96(%rbx), %ymm0, %ymm0
rdar://
10643481
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152762
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 00:29:10 +0000 (00:29 +0000)]
This pass didn't want the inline cost per-se, it just wants generic code
metrics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152760
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Thu, 15 Mar 2012 00:29:08 +0000 (00:29 +0000)]
Remove all remnants of partial specialization in the cost computation
side of things. This is all dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152759
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 15 Mar 2012 00:05:31 +0000 (00:05 +0000)]
Fixed a transform crash when setting a negative size value for memset. Fixes PR12202.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152756
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 14 Mar 2012 23:33:24 +0000 (23:33 +0000)]
[tsan] use FunctionBlackList
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152755
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 14 Mar 2012 23:22:10 +0000 (23:22 +0000)]
[asan] rename class BlackList to FunctionBlackList and move it into a separate file -- we will need the same functionality in ThreadSanitizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152753
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Mar 2012 23:19:53 +0000 (23:19 +0000)]
Extend the inline cost calculation to account for bonuses due to
correlated pairs of pointer arguments at the callsite. This is designed
to recognize the common C++ idiom of begin/end pointer pairs when the
end pointer is a constant offset from the begin pointer. With the
C-based idiom of a pointer and size, the inline cost saw the constant
size calculation, and this provides the same level of information for
begin/end pairs.
In order to propagate this information we have to search for candidate
operations on a pair of pointer function arguments (or derived from
them) which would be simplified if the pointers had a known constant
offset. Then the callsite analysis looks for such pointer pairs in the
argument list, and applies the appropriate bonus.
This helps LLVM detect that half of bounds-checked STL algorithms
(such as hash_combine_range, and some hybrid sort implementations)
disappear when inlined with a constant size input. However, it's not
a complete fix due the inaccuracy of our cost metric for constants in
general. I'm looking into that next.
Benchmarks showed no significant code size change, and very minor
performance changes. However, specific code such as hashing is showing
significantly cleaner inlining decisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152752
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 14 Mar 2012 23:05:06 +0000 (23:05 +0000)]
When an invoke is marked with metadata indicating its unwind edge
should be ignored by ARC optimization, don't insert new ARC runtime
calls in the unwind destination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152748
91177308-0d34-0410-b5e6-
96231b3b80d8
Francois Pichet [Wed, 14 Mar 2012 22:36:10 +0000 (22:36 +0000)]
Fixes the MSVC build.
Commit r152704 exposed a latent MSVC limitation (aka bug).
Both ilist and and iplist contains the same function:
template<class InIt> void insert(iterator where, InIt first, InIt last) {
for (; first != last; ++first) insert(where, *first);
}
Also ilist inherits from iplist and ilist contains a "using iplist<NodeTy>::insert".
MSVC doesn't know which one to pick and complain with an error.
I think it is safe to delete ilist::insert since it is redundant anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152746
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 14 Mar 2012 20:16:41 +0000 (20:16 +0000)]
Change where we enable the heuristic that delays inlining into functions
which are small enough to themselves be inlined. Delaying in this manner
can be harmful if the function is inelligible for inlining in some (or
many) contexts as it pessimizes the code of the function itself in the
event that inlining does not eventually happen.
Previously the check was written to only do this delaying of inlining
for static functions in the hope that they could be entirely deleted and
in the knowledge that all callers of static functions will have the
opportunity to inline if it is in fact profitable. However, with C++ we
get two other important sources of functions where the definition is
always available for inlining: inline functions and templated functions.
This patch generalizes the inliner to allow linkonce-ODR (the linkage
such C++ routines receive) to also qualify for this delay-based
inlining.
Benchmarking across a range of large real-world applications shows
roughly 2% size increase across the board, but an average speedup of
about 0.5%. Some benhcmarks improved over 2%, and the 'clang' binary
itself (when bootstrapped with this feature) shows a 1% -O0 performance
improvement when run over all Sema, Lex, and Parse source code smashed
into a single file. A clean re-build of Clang+LLVM with a bootstrapped
Clang shows approximately 2% improvement, but that measurement is often
noisy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152737
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Wed, 14 Mar 2012 11:34:19 +0000 (11:34 +0000)]
Some typos in lit command guide
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152712
91177308-0d34-0410-b5e6-
96231b3b80d8