10 years ago[python] Add markup option to disassembler
Gregory Szorc [Sat, 1 Dec 2012 21:57:30 +0000 (21:57 +0000)]
[python] Add markup option to disassembler

Patch contributed by Wladimir J. van der Laan <laanwj@gmail.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169102 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSupport referencing variables defined on the same line.
Eli Bendersky [Sat, 1 Dec 2012 21:54:48 +0000 (21:54 +0000)]
Support referencing variables defined on the same line.

See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/157198.html
and related discussions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169101 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove bugzilla link.
James Molloy [Sat, 1 Dec 2012 14:44:23 +0000 (14:44 +0000)]
Remove bugzilla link.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169091 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation: convert WritingAnLLVMBackend.html to reST
Dmitri Gribenko [Sat, 1 Dec 2012 12:13:48 +0000 (12:13 +0000)]
Documentation: convert WritingAnLLVMBackend.html to reST

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169087 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd .arcconfig to the repository. Useful if someone wants to use phabricator's comman...
Benjamin Kramer [Sat, 1 Dec 2012 12:07:58 +0000 (12:07 +0000)]
Add .arcconfig to the repository. Useful if someone wants to use phabricator's command line tool.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169085 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSROA: Avoid struct and array types early to avoid creating an overly large integer...
Benjamin Kramer [Sat, 1 Dec 2012 11:53:32 +0000 (11:53 +0000)]
SROA: Avoid struct and array types early to avoid creating an overly large integer type.

Fixes PR14465.

Differential Revision: http://llvm-reviews.chandlerc.com/D148

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169084 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRevert previous check in r168581, r169079 as they are still in code review status.
Zhou Sheng [Sat, 1 Dec 2012 10:54:28 +0000 (10:54 +0000)]
Revert previous check in r168581, r169079 as they are still in code review status.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169083 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThe patch is to improve the memory footprint of pass GlobalOpt.
Zhou Sheng [Sat, 1 Dec 2012 04:38:53 +0000 (04:38 +0000)]
The patch is to improve the memory footprint of pass GlobalOpt.
Also check in a case to repeat the issue, on which 'opt -globalopt' consumes 1.6GB memory.
The big memory footprint cause is that current GlobalOpt one by one hoists and stores the leaf element constant into the global array, in each iteration, it recreates the global array initializer constant and leave the old initializer alone. This may result in many obsolete constants left.
For example:  we have global array @rom = global [16 x i32] zeroinitializer
After the first element value is hoisted and installed:   @rom = global [16 x i32] [ 1, 0, 0, ... ]
After the second element value is installed:  @rom = global [16 x 32] [ 1, 2, 0, 0, ... ]        // here the previous initializer is obsolete
When the transform is done, we have 15 obsolete initializers left useless.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169079 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoVMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().
NAKAMURA Takumi [Sat, 1 Dec 2012 02:23:45 +0000 (02:23 +0000)]
VMCore/DebugInfo.cpp: DICompileUnit::getSubprograms(): Check numOperands().

2012-11-30-misched-dbg.ll had crashed. Then (MDNode)N was "!{}".
I am not sure it would be ill-formed or not.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169074 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMC/AsmParser: Avoid unnecessary use of SourceMgr::FindBufferForLoc()
Daniel Dunbar [Sat, 1 Dec 2012 01:38:48 +0000 (01:38 +0000)]
MC/AsmParser: Avoid unnecessary use of SourceMgr::FindBufferForLoc()

 - Each macro instantiation introduces a new buffer, and FindBufferForLoc() is
   linear, so previously macro instantiation could be N^2 for some pathological

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169073 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agomisched: Fix RegisterPressureTracker handling of DebugVals.
Andrew Trick [Sat, 1 Dec 2012 01:22:49 +0000 (01:22 +0000)]
misched: Fix RegisterPressureTracker handling of DebugVals.

Assertion failed: (TopRPTracker.getPos() == RegionBegin && "bad initial Top tracker").

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169072 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agomisched: Fix the DAG builder to handle an undef operand at ExitSU.
Andrew Trick [Sat, 1 Dec 2012 01:22:44 +0000 (01:22 +0000)]
misched: Fix the DAG builder to handle an undef operand at ExitSU.

Assertion failed: (VNI && "No value to read by operand")

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169071 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agomisched: Fix LiveInterval update to better handle DebugVal.
Andrew Trick [Sat, 1 Dec 2012 01:22:41 +0000 (01:22 +0000)]
misched: Fix LiveInterval update to better handle DebugVal.

Assertion failed: (itr != mi2iMap.end() && "Instruction not found in maps.")

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169070 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agomisched: fix RegionBegin when DebugValues get shuffled to the top.
Andrew Trick [Sat, 1 Dec 2012 01:22:38 +0000 (01:22 +0000)]
misched: fix RegionBegin when DebugValues get shuffled to the top.

assert (RemainingInstrs == 0 && "Instruction count mismatch!")


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169069 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSimplify REG_SEQUENCE lowering.
Jakob Stoklund Olesen [Sat, 1 Dec 2012 01:06:44 +0000 (01:06 +0000)]
Simplify REG_SEQUENCE lowering.

The TwoAddressInstructionPass takes the machine code out of SSA form by
expanding REG_SEQUENCE instructions into copies. It is no longer
necessary to rewrite the registers used by a REG_SEQUENCE instruction
because the new coalescer algorithm can do it now.

REG_SEQUENCE is just converted to a sequence of sub-register copies now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169067 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp
Michael Ilseman [Sat, 1 Dec 2012 00:42:27 +0000 (00:42 +0000)]
Update the emacs mode to recognize fadd, fsum, fmul, fdiv, frem, fcmp, icmp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169064 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd some first skeleton work for the DWARF5 Fission proposal. Emit
Eric Christopher [Fri, 30 Nov 2012 23:59:06 +0000 (23:59 +0000)]
Add some first skeleton work for the DWARF5 Fission proposal. Emit
part of the compile unit CU and start separating out information into
the various sections that will be pulled out later.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169061 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoConvert COPY instructions into KILLs if they have implicit defs.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 23:53:00 +0000 (23:53 +0000)]
Convert COPY instructions into KILLs if they have implicit defs.

MachineCopyPropagation doesn't understand super-register liveness well
enough to be able to remove implicit defs of super-registers.

This fixes a problem in ARM/2012-01-26-CopyPropKills.ll that is exposed
by an future TwoAddressInstructionPass change. The KILL instructions are
removed before the machine code is emitted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169060 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd support for fission attributes/forms/operations -> string.
Eric Christopher [Fri, 30 Nov 2012 23:20:43 +0000 (23:20 +0000)]
Add support for fission attributes/forms/operations -> string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169056 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoVim mode updated to recognize fast-math flags
Michael Ilseman [Fri, 30 Nov 2012 23:18:21 +0000 (23:18 +0000)]
Vim mode updated to recognize fast-math flags

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169055 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemoved redundancy in wording
Michael Ilseman [Fri, 30 Nov 2012 23:14:52 +0000 (23:14 +0000)]
Removed redundancy in wording

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169053 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoClean up the documentation to have a common description area for fast-math flags.
Michael Ilseman [Fri, 30 Nov 2012 23:12:42 +0000 (23:12 +0000)]
Clean up the documentation to have a common description area for fast-math flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169052 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoBe more clear on what parts of code I own.
Bill Wendling [Fri, 30 Nov 2012 23:00:25 +0000 (23:00 +0000)]
Be more clear on what parts of code I own.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169050 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoreversed the logic of the log2 detection routine to reduce the number of nested ifs
Pedro Artigas [Fri, 30 Nov 2012 22:47:15 +0000 (22:47 +0000)]
reversed the logic of the log2 detection routine to reduce the number of nested ifs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169049 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agominor cleanups
Nadav Rotem [Fri, 30 Nov 2012 22:37:11 +0000 (22:37 +0000)]
minor cleanups

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169048 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix a bug in APFloat.cpp: declare APFloat after fltSemantics it
Alexey Samsonov [Fri, 30 Nov 2012 22:27:54 +0000 (22:27 +0000)]
Fix a bug in APFloat.cpp: declare APFloat after fltSemantics it
uses. APFloat::convert() takes the pointer to the fltSemantics
variable, which is later accessed it in ~APFloat() desctructor.
That is, semantics must still be alive at the moment we delete

Found by experimental AddressSanitizer use-after-scope checker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169047 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd me as LTO code owner.
Bill Wendling [Fri, 30 Nov 2012 22:15:08 +0000 (22:15 +0000)]
Add me as LTO code owner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169046 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoReplace r168930 with a more reasonable patch.
Bill Wendling [Fri, 30 Nov 2012 22:08:55 +0000 (22:08 +0000)]
Replace r168930 with a more reasonable patch.

The original patch removed a bunch of code that the SjLjEHPrepare pass placed
into the entry block if all of the landing pads were removed during the
CodeGenPrepare class. The more natural way of doing things is to run the CGP
*before* we run the SjLjEHPrepare pass.

Make it so!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169044 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAddresses many style issues with prior checkin (r169025)
Pedro Artigas [Fri, 30 Nov 2012 22:07:05 +0000 (22:07 +0000)]
Addresses many style issues with prior checkin (r169025)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169043 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a -time-compilations=<N> option to llc.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:47 +0000 (21:42 +0000)]
Add a -time-compilations=<N> option to llc.

This causes llc to repeat the module compilation N times, making it
possible to get more accurate information from -time-passes when
compiling small modules.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169040 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAggregate pass execution time report by pass ID instead of pass instance.
Jakob Stoklund Olesen [Fri, 30 Nov 2012 21:42:45 +0000 (21:42 +0000)]
Aggregate pass execution time report by pass ID instead of pass instance.

This avoids unidentified duplicates in the pass execution time report
when a pass runs more than once in the pass manager pipeline.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169039 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agolit: Add a simple test suite for checking test runner parallelism.
Daniel Dunbar [Fri, 30 Nov 2012 21:34:04 +0000 (21:34 +0000)]
lit: Add a simple test suite for checking test runner parallelism.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169038 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agotest/CodeGen/PowerPC/vec_mul.ll: Add a triple. Thanks, Hal.
Chad Rosier [Fri, 30 Nov 2012 19:15:10 +0000 (19:15 +0000)]
test/CodeGen/PowerPC/vec_mul.ll: Add a triple. Thanks, Hal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169026 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd fast math inst combine X*log2(Y*0.5)-->X*log2(Y)-X
Pedro Artigas [Fri, 30 Nov 2012 19:09:41 +0000 (19:09 +0000)]
Add fast math inst combine X*log2(Y*0.5)-->X*log2(Y)-X

reviewed by Michael Ilseman <milseman@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169025 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCodegen failure for vmull with small vectors
Sebastian Pop [Fri, 30 Nov 2012 19:08:04 +0000 (19:08 +0000)]
Codegen failure for vmull with small vectors

Codegen was failing with an assertion because of unexpected vector
operands when legalizing the selection DAG for a MUL instruction.

The asserting code was legalizing multiplies for vectors of size 128
bits. It uses a custom lowering to try and detect cases where it can
use a VMULL instruction instead of a VMOVL + VMUL.  The code was
looking for input operands to the MUL that had been sign or zero
extended. If it found the extended operands it would drop the
sign/zero extension and use the original vector size as input to a
VMULL instruction.

The code assumed that the original input vector was 64 bits so that
after dropping the extension it would fit directly into a D register
and could be used as an operand of a VMULL instruction. The input
code that trigger the failure used a vector of <4 x i8> that was
sign extended to <4 x i32>. It was not safe to drop the sign
extension in this case because the original vector is only 32 bits
wide. The fix is to insert a sign extension for the vector to reach
the required 64 bit size. In this particular example, the vector would
need to be sign extented to a <4 x i16>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169024 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agotest/CodeGen/PowerPC/vec_mul.ll: Fix register operands.
Chad Rosier [Fri, 30 Nov 2012 18:29:01 +0000 (18:29 +0000)]
test/CodeGen/PowerPC/vec_mul.ll: Fix register operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169020 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse multiclass for the load instructions with MEMri operand.
Jyotsna Verma [Fri, 30 Nov 2012 17:31:52 +0000 (17:31 +0000)]
Use multiclass for the load instructions with MEMri operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169018 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRemove the use of LPPassManager. We can remove LPM because we dont need to run any...
Nadav Rotem [Fri, 30 Nov 2012 17:27:53 +0000 (17:27 +0000)]
Remove the use of LPPassManager. We can remove LPM because we dont need to run any additional loop passes on the new vector loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169016 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoClean up whitespace and add comments
Eli Bendersky [Fri, 30 Nov 2012 14:22:14 +0000 (14:22 +0000)]
Clean up whitespace and add comments

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169002 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMake FileCheck return 2 in case of an error as documented,
Eli Bendersky [Fri, 30 Nov 2012 13:51:33 +0000 (13:51 +0000)]
Make FileCheck return 2 in case of an error as documented,
instead of 1 or true (?!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169001 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agotest/CodeGen/PowerPC: Add explicit -march=ppc32.
NAKAMURA Takumi [Fri, 30 Nov 2012 13:28:31 +0000 (13:28 +0000)]
test/CodeGen/PowerPC: Add explicit -march=ppc32.

FIXME: Please add another RUN line if you would like to check also on ppc64.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168999 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoThis patch fixes the Altivec addend construction for the fused multiply-add
Adhemerval Zanella [Fri, 30 Nov 2012 13:05:44 +0000 (13:05 +0000)]
This patch fixes the Altivec addend construction for the fused multiply-add
instruction (vmaddfp) to conform with IEEE to ensure the sign of a zero
result when resulting product is -0.0.

The -0.0 vector addend to vmaddfp is generated by a creating a vector
with full bits sets and then shifting each elements by 31-bits to the
left, resulting in a vector of 0x80000000 (or -0.0 as float).

The 'buildvec_canonicalize.ll' was adjusted to reflect this change and
the 'vec_mul.ll' was complemented with the float vector multiplication

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168998 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[msan] Tests for vector manipulation instructions.
Evgeniy Stepanov [Fri, 30 Nov 2012 12:12:20 +0000 (12:12 +0000)]
[msan] Tests for vector manipulation instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168997 91177308-0d34-0410-b5e6-96231b3b80d8

Chandler Carruth [Fri, 30 Nov 2012 11:45:22 +0000 (11:45 +0000)]

1) This was the name in the comment block. ;]
2) It matches Clang's __has_feature naming convention.
3) It matches other compiler-feature-test conventions.

Sorry for the noise. =]

I've also switch the comment block to use a \brief tag and not duplicate
the name.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168996 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[asan] simplify the code around doesNotReturn call. It now magically works.
Kostya Serebryany [Fri, 30 Nov 2012 11:08:59 +0000 (11:08 +0000)]
[asan] simplify the code around doesNotReturn call. It now magically works.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168995 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoSeparate out the tests for whether the compiler suports R-value
Chandler Carruth [Fri, 30 Nov 2012 11:04:18 +0000 (11:04 +0000)]
Separate out the tests for whether the compiler suports R-value
references from whether it supports an R-value reference *this. No
version of GCC today supports the latter, which breaks GCC C++11
compiles of LLVM and Clang now.

Also add doxygen comments clarifying what's going on here, and update
the usage in Optional. I'll update the usages in Clang next.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168993 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMore strict error checking in parseSpecifier + simplified code.
Patrik Hagglund [Fri, 30 Nov 2012 10:06:59 +0000 (10:06 +0000)]
More strict error checking in parseSpecifier + simplified code.

For example, don't allow empty strings to be passed to getInt.

Move asserts inside parseSpecifier. (One day we may want to pass parse
error messages to the user - from LLParser - instead of using asserts,
but keep the code simple until then. There have been an attempt to do
this. See r142288, which got reverted, and r142605.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168991 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix non-determinism introduced in r168970 and pointed out by Duncan.
Chandler Carruth [Fri, 30 Nov 2012 09:34:29 +0000 (09:34 +0000)]
Fix non-determinism introduced in r168970 and pointed out by Duncan.

We're iterating over a non-deterministically ordered container looking
for two saturating flags. To do this correctly, we have to saturate
both, and only stop looping if both saturate to their final value.
Otherwise, which flag we see first changes the result.

This is also a micro-optimization of the previous version as now we
don't go into the (possibly expensive) test logic once the first
violation of either constraint is detected.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168989 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoRearrange the comments, control flow, and variable names; no
Chandler Carruth [Fri, 30 Nov 2012 09:26:25 +0000 (09:26 +0000)]
Rearrange the comments, control flow, and variable names; no
functionality changed.

Evan's commit r168970 moved the code that the primary comment in this
function referred to to the other end of the function without moving the
comment, and there has been a steady creep of "boolean" logic in it that
is simpler if handled via early exit. That way each special case can
have its own comments. I've also made the variable name a bit more
explanatory than "AllFit". This is in preparation to fix the
non-deterministic output of this function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168988 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd the rest of the experimental fission sections to MC.
Eric Christopher [Fri, 30 Nov 2012 06:47:06 +0000 (06:47 +0000)]
Add the rest of the experimental fission sections to MC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168986 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse multiclass for the store instructions with MEMri operand.
Jyotsna Verma [Fri, 30 Nov 2012 06:10:22 +0000 (06:10 +0000)]
Use multiclass for the store instructions with MEMri operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168983 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse multiclass for the load instructions with 'base + register offset'
Jyotsna Verma [Fri, 30 Nov 2012 04:19:09 +0000 (04:19 +0000)]
Use multiclass for the load instructions with 'base + register offset'
addressing mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168976 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove library call simplification statistic to instcombine
Meador Inge [Fri, 30 Nov 2012 04:05:06 +0000 (04:05 +0000)]
Move library call simplification statistic to instcombine

The simplify-libcalls pass maintained a statistic to count the number
of library calls that have been simplified.  Now that library call
simplification is being carried out in instcombine the statistic should
be moved to there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168975 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMove the InstVisitor utility into VMCore where it belongs. It heavily
Chandler Carruth [Fri, 30 Nov 2012 03:08:41 +0000 (03:08 +0000)]
Move the InstVisitor utility into VMCore where it belongs. It heavily
depends on the IR infrastructure, there is no sense in it being off in
Support land.

This is in preparation to start working to expand InstVisitor into more
special-purpose visitors that are still generic and can be re-used
across different passes. The expansion will go into the Analylis tree
though as nothing in VMCore needs it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168972 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix logic to determine whether to turn a switch into a lookup table. When
Evan Cheng [Fri, 30 Nov 2012 02:02:42 +0000 (02:02 +0000)]
Fix logic to determine whether to turn a switch into a lookup table. When
the tables cannot fit in registers (i.e. bitmap), do not emit the table
if it's using an illegal type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168970 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoModified dump() to provide a little
Preston Briggs [Fri, 30 Nov 2012 00:44:47 +0000 (00:44 +0000)]
Modified dump() to provide a little
more information for dependences between
instructions that don't share a common loop.

Updated the test results appropriately.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168965 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.
Jordan Rose [Fri, 30 Nov 2012 00:38:53 +0000 (00:38 +0000)]
Add a new C++11 compatibility macro, LLVM_LVALUE_FUNCTION.

This expands to '&', and is intended to be used when an /optional/ rvalue
override is available.

  void foo() const { ... }

  void foo() const LLVM_LVALUE_FUNCTION { ... }
  void foo() && { ... }

This is used to allow moving the contents of an Optional.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168963 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFixed the arm disassembly of invalid BFI instructions to not build a bad MCInst
Kevin Enderby [Thu, 29 Nov 2012 23:47:11 +0000 (23:47 +0000)]
Fixed the arm disassembly of invalid BFI instructions to not build a bad MCInst
which would then cause an assert when printed.  rdar://11437956

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168960 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoMore comment.
Eric Christopher [Thu, 29 Nov 2012 22:56:13 +0000 (22:56 +0000)]
More comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168952 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate comment for malloc being a library call now, rather than an instruction.
Dan Gohman [Thu, 29 Nov 2012 21:58:47 +0000 (21:58 +0000)]
Update comment for malloc being a library call now, rather than an instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168946 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agocopyFastMathFlags utility and test case
Michael Ilseman [Thu, 29 Nov 2012 21:25:12 +0000 (21:25 +0000)]
copyFastMathFlags utility and test case

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168943 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd a FileCheck test that makes sure two different CHECKs won't match the
Eli Bendersky [Thu, 29 Nov 2012 21:24:44 +0000 (21:24 +0000)]
Add a FileCheck test that makes sure two different CHECKs won't match the
same string

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168942 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUpdate my email address.
Dan Gohman [Thu, 29 Nov 2012 21:17:26 +0000 (21:17 +0000)]
Update my email address.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168941 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWhitespace.
Chad Rosier [Thu, 29 Nov 2012 20:58:08 +0000 (20:58 +0000)]

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168937 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix 80-column violations.
Chad Rosier [Thu, 29 Nov 2012 20:56:58 +0000 (20:56 +0000)]
Fix 80-column violations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168936 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoObject: Pass the buffer name through when making a copy.
Benjamin Kramer [Thu, 29 Nov 2012 20:08:03 +0000 (20:08 +0000)]
Object: Pass the buffer name through when making a copy.

Should bring the buildbots back to life.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168935 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd cortex-a5 subtarget to the supported ARM architectures
Quentin Colombet [Thu, 29 Nov 2012 19:48:01 +0000 (19:48 +0000)]
Add cortex-a5 subtarget to the supported ARM architectures

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168933 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoCleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT
Justin Holewinski [Thu, 29 Nov 2012 19:42:09 +0000 (19:42 +0000)]
Cleanup recent addition of DAGTypeLegalizer::SplitVecOp_VSELECT

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168932 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agordar://12100355 (part 1)
Shuxin Yang [Thu, 29 Nov 2012 19:38:54 +0000 (19:38 +0000)]
rdar://12100355 (part 1)

This revision attempts to recognize following population-count pattern:

 while(a) { c++; ... ; a &= a - 1; ... },
  where <c> and <a>could be used multiple times in the loop body.

 TODO: On X8664 and ARM, __buildin_ctpop() are not expanded to a efficent
instruction sequence, which need to be improved in the following commits.

Reviewed by Nadav, really appreciate!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168931 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoHandle the situation where CodeGenPrepare removes a reference to a BB that has
Bill Wendling [Thu, 29 Nov 2012 19:38:06 +0000 (19:38 +0000)]
Handle the situation where CodeGenPrepare removes a reference to a BB that has
the last invoke instruction in the function. This also removes the last landing
pad in an function. This is fine, but with SjLj EH code, we've already placed a
bunch of code in the 'entry' block, which expects the landing pad to stick

When we get to the situation where CGP has removed the last landing pad, go
ahead and nuke the SjLj instructions from the 'entry' block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168930 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoUse multiclass for 'transfer' instructions.
Jyotsna Verma [Thu, 29 Nov 2012 19:35:44 +0000 (19:35 +0000)]
Use multiclass for 'transfer' instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168929 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoNo need to run LICM after loop vectorization because we dont generate invariant code...
Nadav Rotem [Thu, 29 Nov 2012 19:28:29 +0000 (19:28 +0000)]
No need to run LICM after loop vectorization because we dont generate invariant code any more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168928 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoWhen broadcasting invariant scalars into vectors, place the broadcast code in the...
Nadav Rotem [Thu, 29 Nov 2012 19:25:41 +0000 (19:25 +0000)]
When broadcasting invariant scalars into vectors, place the broadcast code in the preheader.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168927 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for FileCheck: use 'option' and 'program' directives.
Dmitri Gribenko [Thu, 29 Nov 2012 19:21:02 +0000 (19:21 +0000)]
Documentation for FileCheck: use 'option' and 'program' directives.

This enables option cross-referencing and now '--' in option names are no more turned into en dashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168926 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoinstcombine: Migrate puts optimizations
Meador Inge [Thu, 29 Nov 2012 19:15:17 +0000 (19:15 +0000)]
instcombine: Migrate puts optimizations

This patch migrates the puts optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

All the simplifiers from simplify-libcalls have now been migrated to
instcombine.  Yay!  Just a few other bits to migrate (prototype attribute
inference and a few statistics) and simplify-libcalls can finally be put
to rest.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168925 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for llvm-link: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:14:35 +0000 (19:14 +0000)]
Documentation for llvm-link: reformat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168924 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFix a memory leak in MachOObjectFile.
Jim Grosbach [Thu, 29 Nov 2012 19:14:11 +0000 (19:14 +0000)]
Fix a memory leak in MachOObjectFile.

MachOObjectFile owns a MachOObj, but never frees it. Both MachOObjectFile
and MachOObj want to own the MemoryBuffer, though, so we have to be careful
and give them each one of their own.

Thanks to Greg Clayton, Eric Christopher and Michael Spencer for helping
figure out what's going wrong here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168923 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for llvm-cov: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:10:21 +0000 (19:10 +0000)]
Documentation for llvm-cov: reformat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168922 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoFollow up to 168711: It's safe to base this analysis on the found compare, just retur...
Benjamin Kramer [Thu, 29 Nov 2012 19:07:57 +0000 (19:07 +0000)]
Follow up to 168711: It's safe to base this analysis on the found compare, just return the value for the right predicate.

Thanks to Andy for catching this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168921 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for llvm-stress: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:05:55 +0000 (19:05 +0000)]
Documentation for llvm-stress: reformat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168920 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for opt: reformat
Dmitri Gribenko [Thu, 29 Nov 2012 19:02:50 +0000 (19:02 +0000)]
Documentation for opt: reformat

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168919 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoImprove isImpliedCond comment a bit.
Andrew Trick [Thu, 29 Nov 2012 18:35:13 +0000 (18:35 +0000)]
Improve isImpliedCond comment a bit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168914 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[ASan] Simplify check added in r168861. Bail out from module pass early if the module...
Alexey Samsonov [Thu, 29 Nov 2012 18:27:01 +0000 (18:27 +0000)]
[ASan] Simplify check added in r168861. Bail out from module pass early if the module is blacklisted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168913 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for llc: reformat.
Dmitri Gribenko [Thu, 29 Nov 2012 18:16:11 +0000 (18:16 +0000)]
Documentation for llc: reformat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168912 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoApply Takumi's patch to suppress unused-variable warnings in -Asserts builds.
Matt Beaumont-Gay [Thu, 29 Nov 2012 18:15:49 +0000 (18:15 +0000)]
Apply Takumi's patch to suppress unused-variable warnings in -Asserts builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168911 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdd options to AddressSanitizer passes to make them configurable by frontend.
Alexey Samsonov [Thu, 29 Nov 2012 18:14:24 +0000 (18:14 +0000)]
Add options to AddressSanitizer passes to make them configurable by frontend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168910 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agofix a typo
Shuxin Yang [Thu, 29 Nov 2012 18:09:37 +0000 (18:09 +0000)]
fix a typo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168909 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for lit: more formatting: use 'option' and 'program' directives.
Dmitri Gribenko [Thu, 29 Nov 2012 18:03:08 +0000 (18:03 +0000)]
Documentation for lit: more formatting: use 'option' and 'program' directives.

This enables cross-referencing and now '--' in option names are no more turned into en dashes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168906 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoOne more step towards making doInitialization and doFinalization useful for
Pedro Artigas [Thu, 29 Nov 2012 17:47:05 +0000 (17:47 +0000)]
One more step towards making doInitialization and doFinalization useful for
start up and clean up module passes, now that ASAN and TSAN are fixed the
tests pass

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168905 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for tblgen: formatting
Dmitri Gribenko [Thu, 29 Nov 2012 17:41:05 +0000 (17:41 +0000)]
Documentation for tblgen: formatting

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168904 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation for lit: formatting improvements.
Dmitri Gribenko [Thu, 29 Nov 2012 17:05:34 +0000 (17:05 +0000)]
Documentation for lit: formatting improvements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168902 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoTest commit.
Patrik Hagglund [Thu, 29 Nov 2012 16:19:11 +0000 (16:19 +0000)]
Test commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168899 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoDocumentation: formatting improvements
Dmitri Gribenko [Thu, 29 Nov 2012 16:12:13 +0000 (16:12 +0000)]
Documentation: formatting improvements

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168897 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoinstcombine: Migrate fputs optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:43 +0000 (15:45 +0000)]
instcombine: Migrate fputs optimizations

This patch migrates the fputs optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168893 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoinstcombine: Migrate fwrite optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:39 +0000 (15:45 +0000)]
instcombine: Migrate fwrite optimizations

This patch migrates the fwrite optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168892 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoinstcombine: Migrate fprintf optimizations
Meador Inge [Thu, 29 Nov 2012 15:45:33 +0000 (15:45 +0000)]
instcombine: Migrate fprintf optimizations

This patch migrates the fprintf optimizations from the simplify-libcalls
pass into the instcombine library call simplifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168891 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[msan] Handle vector manipulation instructions.
Evgeniy Stepanov [Thu, 29 Nov 2012 15:22:06 +0000 (15:22 +0000)]
[msan] Handle vector manipulation instructions.

Handle insertelement, extractelement, shufflevector.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168889 91177308-0d34-0410-b5e6-96231b3b80d8

10 years ago[msan] Fix getOriginForNaryOp.
Evgeniy Stepanov [Thu, 29 Nov 2012 14:44:00 +0000 (14:44 +0000)]
[msan] Fix getOriginForNaryOp.

The old version failed on a 3-arg instruction with (-1, 0, 0) shadows (it would
pick the 3rd operand origin irrespective of its shadow).

The new version always picks the origin of the rightmost poisoned operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168887 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agoAdded atomic 64 min/max/umin/umax instrinsics support in the ARM backend.
Silviu Baranga [Thu, 29 Nov 2012 14:41:25 +0000 (14:41 +0000)]
Added atomic 64 min/max/umin/umax instrinsics support in the ARM backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168886 91177308-0d34-0410-b5e6-96231b3b80d8

10 years agomisched: Recompute priority queue when DFSResults are updated.
Benjamin Kramer [Thu, 29 Nov 2012 14:36:26 +0000 (14:36 +0000)]
misched: Recompute priority queue when DFSResults are updated.

This was found by MSVC10's STL debug mode on a test from the test suite. Sadly
std::is_heap isn't standard so there is no way to assert this without writing
our own heap verify, which looks like overkill to me.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168885 91177308-0d34-0410-b5e6-96231b3b80d8