oota-llvm.git
10 years agoUpdate LangRef to emphasize the difference between "coldcc" and "preserve_mostcc".
Juergen Ributzka [Fri, 17 Jan 2014 22:24:35 +0000 (22:24 +0000)]
Update LangRef to emphasize the difference between "coldcc" and "preserve_mostcc".

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

10 years ago80-column.
Rui Ueyama [Fri, 17 Jan 2014 22:11:27 +0000 (22:11 +0000)]
80-column.

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

10 years agollvm-objdump/COFF: Print ordinal base number.
Rui Ueyama [Fri, 17 Jan 2014 22:02:24 +0000 (22:02 +0000)]
llvm-objdump/COFF: Print ordinal base number.

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

10 years agoAdd two new calling conventions for runtime calls
Juergen Ributzka [Fri, 17 Jan 2014 19:47:03 +0000 (19:47 +0000)]
Add two new calling conventions for runtime calls

This patch adds two new target-independent calling conventions for runtime
calls - PreserveMost and PreserveAll.
The target-specific implementation for X86-64 is defined as following:
  - Arguments are passed as for the default C calling convention
  - The same applies for the return value(s)
  - PreserveMost preserves all GPRs - except R11
  - PreserveAll preserves all GPRs and all XMMs/YMMs - except R11

Reviewed by Lang and Philip

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

10 years ago[mips][msa] Correct pattern for LSA
Daniel Sanders [Fri, 17 Jan 2014 15:40:05 +0000 (15:40 +0000)]
[mips][msa] Correct pattern for LSA

Summary:
$rs and $rt were the wrong way round in the .td and the testcase wasn't
strict enough to detect the mistake.

Reviewers: matheusalmeida

Reviewed By: matheusalmeida

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

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

10 years ago[mips] Split IIIdiv int II_DIV, II_DIVU, II_DDIV, and II_DDIVU
Daniel Sanders [Fri, 17 Jan 2014 14:48:06 +0000 (14:48 +0000)]
[mips] Split IIIdiv int II_DIV, II_DIVU, II_DDIV, and II_DDIVU

No functional change since the InstrItinData's were duplicated

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

10 years ago[mips][sched] Split IIImul and IIImult into subclasses.
Daniel Sanders [Fri, 17 Jan 2014 14:32:41 +0000 (14:32 +0000)]
[mips][sched] Split IIImul and IIImult into subclasses.

IIImul -> II_MUL
IIImult -> II_MULT, II_MULTU, II_MADD, II_MADDU, II_MSUB, II_MSUBU, II_DMULT, II_DMULTU

No functional change since the InstrItinData's have been duplicated.

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

10 years ago[mips][sched] Split IIHiLo into II_MFHI_MFLO and II_MTHI_MTLO
Daniel Sanders [Fri, 17 Jan 2014 14:17:34 +0000 (14:17 +0000)]
[mips][sched] Split IIHiLo into II_MFHI_MFLO and II_MTHI_MTLO

No functional change since the InstrItinData's have been duplicated.

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

10 years agoAdd MLA alias for ARMv4 support.
Renato Golin [Fri, 17 Jan 2014 13:53:08 +0000 (13:53 +0000)]
Add MLA alias for ARMv4 support.

Fix MLA defs to use register class GPRnopc.
Add encoding tests for multiply instructions.
(Alias for MUL/SMLAL/UMLAL added by r199026.)

Patch by Zhaoshi.

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

10 years ago[PM] [cleanup] Rename some of the Verifier's members, re-arrange them,
Chandler Carruth [Fri, 17 Jan 2014 11:09:34 +0000 (11:09 +0000)]
[PM] [cleanup] Rename some of the Verifier's members, re-arrange them,
and tweak comments prior to more invasive surgery. Also clean up some
other non-doxygen comments, and run clang-format over the parts that are
going to change dramatically in subsequent commits so that those don't
get cluttered with formatting changes.

No functionality changed.

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

10 years ago[asan] extend asan-coverage (still experimental).
Kostya Serebryany [Fri, 17 Jan 2014 11:00:30 +0000 (11:00 +0000)]
[asan] extend asan-coverage (still experimental).
 - add a mode for collecting per-block coverage (-asan-coverage=2).
   So far the implementation is naive (all blocks are instrumented),
   the performance overhead on top of asan could be as high as 30%.
 - Make sure the one-time calls to __sanitizer_cov are moved to function buttom,
   which in turn required to copy the original debug info into the call insn.

Here is the performance data on SPEC 2006
(train data, comparing asan with asan-coverage={0,1,2}):

                             asan+cov0     asan+cov1      diff 0-1    asan+cov2       diff 0-2      diff 1-2
       400.perlbench,        65.60,        65.80,         1.00,        76.20,         1.16,         1.16
           401.bzip2,        65.10,        65.50,         1.01,        75.90,         1.17,         1.16
             403.gcc,         1.64,         1.69,         1.03,         2.04,         1.24,         1.21
             429.mcf,        21.90,        22.60,         1.03,        23.20,         1.06,         1.03
           445.gobmk,       166.00,       169.00,         1.02,       205.00,         1.23,         1.21
           456.hmmer,        88.30,        87.90,         1.00,        91.00,         1.03,         1.04
           458.sjeng,       210.00,       222.00,         1.06,       258.00,         1.23,         1.16
      462.libquantum,         1.73,         1.75,         1.01,         2.11,         1.22,         1.21
         464.h264ref,       147.00,       152.00,         1.03,       160.00,         1.09,         1.05
         471.omnetpp,       115.00,       116.00,         1.01,       140.00,         1.22,         1.21
           473.astar,       133.00,       131.00,         0.98,       142.00,         1.07,         1.08
       483.xalancbmk,       118.00,       120.00,         1.02,       154.00,         1.31,         1.28
            433.milc,        19.80,        20.00,         1.01,        20.10,         1.02,         1.01
            444.namd,        16.20,        16.20,         1.00,        17.60,         1.09,         1.09
          447.dealII,        41.80,        42.20,         1.01,        43.50,         1.04,         1.03
          450.soplex,         7.51,         7.82,         1.04,         8.25,         1.10,         1.05
          453.povray,        14.00,        14.40,         1.03,        15.80,         1.13,         1.10
             470.lbm,        33.30,        34.10,         1.02,        34.10,         1.02,         1.00
         482.sphinx3,        12.40,        12.30,         0.99,        13.00,         1.05,         1.06

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

10 years ago[PM] Remove the preverifier and directly compute the DominatorTree for
Chandler Carruth [Fri, 17 Jan 2014 10:56:02 +0000 (10:56 +0000)]
[PM] Remove the preverifier and directly compute the DominatorTree for
the verifier after ensuring the CFG is at least usefully formed.

This fixes a number of problems:
1) The PreVerifier was missing the controls the Verifier provides over
   *how* an invalid module is handled -- it just aborted the program!
   Now it uses the same logic as the Verifier which is significantly
   more library-friendly.
2) The DominatorTree used previously could have been cached and not
   updated due to bugs in prior passes and we would silently use the
   stale tree. This could cause dominance errors to not be as quickly
   diagnosed.
3) We can now (in the next patch) pull the functionality of the verifier
   apart from the pass infrastructure so that you can verify IR without
   having any form of pass manager. This in turn frees the code to share
   logic between old and new pass manager variants.

Along the way I fixed at least one annoying bug -- the state for
'Broken' wasn't being cleared from run to run causing all functions
visited after the first broken function to be marked as broken
regardless of whether *they* were a problem. Fortunately, I don't really
know much of a way to observe this peculiarity.

In case folks are worried about the runtime cost, its negligible.
I looked at running the entire regression test suite (which should be
a relatively good use of the verifier) before and after but was unable
to even measure the time spent on the verifier and there was no
regresion from before to after. I checked both with debug builds and
optimized builds.

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

10 years ago[AArch64 NEON] Expand vector for UDIV/SDIV/UREM/SREM/FREM as neon doesn't support...
Kevin Qin [Fri, 17 Jan 2014 09:54:30 +0000 (09:54 +0000)]
[AArch64 NEON] Expand vector for UDIV/SDIV/UREM/SREM/FREM as neon doesn't support these operations.

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

10 years agoAdd the test for libstdc++ versions newer than 4.6 so we don't
Chandler Carruth [Fri, 17 Jan 2014 09:47:55 +0000 (09:47 +0000)]
Add the test for libstdc++ versions newer than 4.6 so we don't
accidentally pick that up while using Clang and run into subtle bugs
down the road related to C++11 features not fully implemented in that
version of the standard library.

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

10 years agoSwitch a few instructions to use RI instead I so they don't require REX_W to be expli...
Craig Topper [Fri, 17 Jan 2014 08:16:57 +0000 (08:16 +0000)]
Switch a few instructions to use RI instead I so they don't require REX_W to be explicitly specified.

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

10 years agoAdd OpSize16 flags to 32-bit CRC32 instructions so they can be encoded correctly...
Craig Topper [Fri, 17 Jan 2014 08:01:20 +0000 (08:01 +0000)]
Add OpSize16 flags to 32-bit CRC32 instructions so they can be encoded correctly in 16-bit mode.

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

10 years agoTeach x86 asm parser to handle 'opaque ptr' in Intel syntax.
Craig Topper [Fri, 17 Jan 2014 07:44:10 +0000 (07:44 +0000)]
Teach x86 asm parser to handle 'opaque ptr' in Intel syntax.

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

10 years agoTeach X86 asm parser to understand 'ZMMWORD PTR' in Intel syntax.
Craig Topper [Fri, 17 Jan 2014 07:37:39 +0000 (07:37 +0000)]
Teach X86 asm parser to understand 'ZMMWORD PTR' in Intel syntax.

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

10 years agoFix intel syntax for 64-bit version of FXSAVE/FXRSTOR to use '64' suffix instead...
Craig Topper [Fri, 17 Jan 2014 07:25:39 +0000 (07:25 +0000)]
Fix intel syntax for 64-bit version of FXSAVE/FXRSTOR to use '64' suffix instead of 'q'

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

10 years agoVEX_PREFIX_66 doesn't need to set the hasOpSize flag since VEX instructions don't...
Craig Topper [Fri, 17 Jan 2014 07:11:45 +0000 (07:11 +0000)]
VEX_PREFIX_66 doesn't need to set the hasOpSize flag since VEX instructions don't use the size fields it controls.

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

10 years agoReplace duplicated code with a existing helper function.
Craig Topper [Fri, 17 Jan 2014 06:42:38 +0000 (06:42 +0000)]
Replace duplicated code with a existing helper function.

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

10 years ago[AArch64]Fix the problem can't select f16_to_f32 and f32_to_f16.
Hao Liu [Fri, 17 Jan 2014 06:23:30 +0000 (06:23 +0000)]
[AArch64]Fix the problem can't select f16_to_f32 and f32_to_f16.
Also add copy support for FPR16.
Also add a missing test case file belongs to commit r197361.

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

10 years ago[AArch64 NEON] Custom lower conversion between vector integer and vector floating...
Kevin Qin [Fri, 17 Jan 2014 05:52:35 +0000 (05:52 +0000)]
[AArch64 NEON] Custom lower conversion between vector integer and vector floating point if element bit-width doesn't match.

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

10 years ago[AArch64]Fix the problem can't select concat_vectors of two v1i32 types.
Hao Liu [Fri, 17 Jan 2014 05:44:46 +0000 (05:44 +0000)]
[AArch64]Fix the problem can't select concat_vectors of two v1i32 types.
Also fix the problem can't select scalar_to_vector from f32 to v2f32/v4f32.

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

10 years agoFix bad variable syntax in r199413
Bob Wilson [Fri, 17 Jan 2014 00:40:39 +0000 (00:40 +0000)]
Fix bad variable syntax in r199413

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

10 years agoUse LLVM_EXPLICIT instead of a function pointer as bool.
Rafael Espindola [Thu, 16 Jan 2014 23:37:23 +0000 (23:37 +0000)]
Use LLVM_EXPLICIT instead of a function pointer as bool.

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

10 years agoChange inalloca rules to make it only apply to the last parameter
Reid Kleckner [Thu, 16 Jan 2014 22:59:24 +0000 (22:59 +0000)]
Change inalloca rules to make it only apply to the last parameter

This makes things a lot easier, because we can now talk about the
"argument allocation", which allocates all the memory for the call in
one shot.

The only functional change is to the verifier for a feature that hasn't
shipped yet.

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

10 years ago[opt][PassInfo] Allow opt to run passes that need target machine.
Quentin Colombet [Thu, 16 Jan 2014 21:44:34 +0000 (21:44 +0000)]
[opt][PassInfo] Allow opt to run passes that need target machine.

When registering a pass, a pass can now specify a second construct that takes as
argument a pointer to TargetMachine.
The PassInfo class has been updated to reflect that possibility.
If such a constructor exists opt will use it instead of the default constructor
when instantiating the pass.

Since such IR passes are supposed to be rare, no specific support has been
added to this commit to allow an easy registration of such a pass.
In other words, for such pass, the initialization function has to be
hand-written (see CodeGenPrepare for instance).

Now, codegenprepare can be tested using opt:
opt -codegenprepare -mtriple=mytriple input.ll

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

10 years agoLTO: document LTO_API_VERSION for each API
Duncan P. N. Exon Smith [Thu, 16 Jan 2014 21:37:17 +0000 (21:37 +0000)]
LTO: document LTO_API_VERSION for each API

Adding a doxygen comment for each bit of API to indicate at which
LTO_API_VERSION each was available, manually gleaned from successive
git-blames.  A few notes:

- LTO_API_VERSION was set to 3 at its introduction.
- I've indicated all the API introduced before LTO_API_VERSION was
  around as available "prior to LTO_API_VERSION=3".
- A number of API changes neglected to bump LTO_API_VERSION.  These I've
  indicated as available at the *next* bump of LTO_API_VERSION.

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

10 years agoFix two cases where we could lose fast math flags when optimizing FADD expressions.
Owen Anderson [Thu, 16 Jan 2014 21:26:02 +0000 (21:26 +0000)]
Fix two cases where we could lose fast math flags when optimizing FADD expressions.

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

10 years agoFix an instance where we would drop fast math flags when performing an fdiv to recipr...
Owen Anderson [Thu, 16 Jan 2014 21:07:52 +0000 (21:07 +0000)]
Fix an instance where we would drop fast math flags when performing an fdiv to reciprocal multiply transformation.

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

10 years agoFix a bug in InstCombine where we failed to preserve fast math flags when optimizing...
Owen Anderson [Thu, 16 Jan 2014 20:59:41 +0000 (20:59 +0000)]
Fix a bug in InstCombine where we failed to preserve fast math flags when optimizing an FMUL expression.

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

10 years agoFix style issues.
Rui Ueyama [Thu, 16 Jan 2014 20:57:55 +0000 (20:57 +0000)]
Fix style issues.

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

10 years agollvm-objdump/COFF: Print DLL name in the export table header.
Rui Ueyama [Thu, 16 Jan 2014 20:50:34 +0000 (20:50 +0000)]
llvm-objdump/COFF: Print DLL name in the export table header.

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

10 years agoTeach InstCombine that (fmul X, -1.0) can be simplified to (fneg X), which LLVM expre...
Owen Anderson [Thu, 16 Jan 2014 20:36:42 +0000 (20:36 +0000)]
Teach InstCombine that (fmul X, -1.0) can be simplified to (fneg X), which LLVM expresses as (fsub -0.0, X).

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

10 years agoUse static instead of anonymous namespace.
Rui Ueyama [Thu, 16 Jan 2014 20:30:36 +0000 (20:30 +0000)]
Use static instead of anonymous namespace.

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

10 years agoReduce nesting.
Rui Ueyama [Thu, 16 Jan 2014 20:22:55 +0000 (20:22 +0000)]
Reduce nesting.

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

10 years agoUse the current local variable naming style.
Rui Ueyama [Thu, 16 Jan 2014 20:11:48 +0000 (20:11 +0000)]
Use the current local variable naming style.

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

10 years agoPass the --enable-libcpp configure option for cross builds, too.
Bob Wilson [Thu, 16 Jan 2014 19:35:01 +0000 (19:35 +0000)]
Pass the --enable-libcpp configure option for cross builds, too.

<rdar://problem/15831288>

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

10 years agoTweak the MCExternalSymbolizer to print references to C string literals
Kevin Enderby [Thu, 16 Jan 2014 18:43:56 +0000 (18:43 +0000)]
Tweak the MCExternalSymbolizer to print references to C string literals
with raw_ostream's write_escaped() method.

For example darwin's otool(1) program that uses the llvm
disassembler now produces disassembly like this:

leaq 0x7b(%rip), %rdi ## literal pool for: "%f\ntoto\n"

and not print the new lines which messes up the output.

rdar://15145300

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

10 years agollvm-symbolizer: make mangled name heuristic apply to all symbols
Ed Maste [Thu, 16 Jan 2014 17:25:12 +0000 (17:25 +0000)]
llvm-symbolizer: make mangled name heuristic apply to all symbols

PR: http://llvm.org/pr18431
Review: http://llvm-reviews.chandlerc.com/D2552

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

10 years ago[mips][sched] Removed IIXfer. No instructions use it.
Daniel Sanders [Thu, 16 Jan 2014 17:23:08 +0000 (17:23 +0000)]
[mips][sched] Removed IIXfer. No instructions use it.

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

10 years ago[mips][sched] Put AND, OR, XOR, MOVT_I, and MOVF_I in the same itinerary class as...
Daniel Sanders [Thu, 16 Jan 2014 17:13:57 +0000 (17:13 +0000)]
[mips][sched] Put AND, OR, XOR, MOVT_I, and MOVF_I in the same itinerary class as their non-microMIPS counterparts.

No functional change since both classes have the same InstrItinData definition.

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

10 years agoAdd an emitRawComment function and use it to simplify some uses of EmitRawText.
Rafael Espindola [Thu, 16 Jan 2014 16:28:37 +0000 (16:28 +0000)]
Add an emitRawComment function and use it to simplify some uses of EmitRawText.

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

10 years ago[mips][sched] Split IIseb into II_SEB and II_SEH
Daniel Sanders [Thu, 16 Jan 2014 16:19:38 +0000 (16:19 +0000)]
[mips][sched] Split IIseb into II_SEB and II_SEH

No functional change since there are no InstrItinData's.

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

10 years ago[mips][sched] Split IILogic into II_AND, II_OR, II_XOR, II_ANDI, II_ORI, II_XORI
Daniel Sanders [Thu, 16 Jan 2014 15:57:05 +0000 (15:57 +0000)]
[mips][sched] Split IILogic into II_AND, II_OR, II_XOR, II_ANDI, II_ORI, II_XORI

This is necessary because the classes are shared between all implementations.

No functional change since the InstrItinData's have been duplicated.

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

10 years agoMove the xscale build attribute test to the proper place and remove the old one.
Amara Emerson [Thu, 16 Jan 2014 15:11:54 +0000 (15:11 +0000)]
Move the xscale build attribute test to the proper place and remove the old one.

The encoding of build attributes is already tested in CodeGen/ARM/build-attributes-encoding.s

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

10 years ago[mips][sched] Split IIArith in preparation for the first scheduler targeting a specif...
Daniel Sanders [Thu, 16 Jan 2014 14:27:20 +0000 (14:27 +0000)]
[mips][sched] Split IIArith in preparation for the first scheduler targeting a specific MIPS CPU.

IIArith -> II_ADD, II_ADDU, II_AND, II_CL[ZO], II_DADDIU, II_DADDU,
  II_DROTR, II_DROTR32, II_DROTRV, II_DSLL, II_DSLL32, II_DSLLV,
  II_DSR[AL], II_DSR[AL]32, II_DSR[AL]V, II_DSUBU, II_LUI, II_MOV[ZFNT],
  II_NOR, II_OR, II_RDHWR, II_ROTR, II_ROTRV, II_SLL, II_SLLV, II_SR[AL],
  II_SR[AL]V, II_SUBU, II_XOR

No functional change since the InstrItinData's have been duplicated.

This is necessary because the classes are shared between all schedulers.

Once this patch series is committed there will be an InstrItinClass for
each mnemonic with minimal grouping. This does increase the size of the
itinerary tables for each MIPS scheduler but we have a few options for dealing
with that later. These options include reducing the number of classes once
we see the best way to simplify them, or by extending tablegen to be able
to compress the table by eliminating duplicates entries, etc.

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

10 years ago[mips] Correct itin class for MULT_MM and MULTu_MM to IIImult.
Daniel Sanders [Thu, 16 Jan 2014 14:02:48 +0000 (14:02 +0000)]
[mips] Correct itin class for MULT_MM and MULTu_MM to IIImult.

This matches the itin class used by the non-microMIPS equivalents of these
instructions.

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

10 years ago[mips] IIImult should have an InstrItinData in the generic scheduler. Used the same...
Daniel Sanders [Thu, 16 Jan 2014 13:45:53 +0000 (13:45 +0000)]
[mips] IIImult should have an InstrItinData in the generic scheduler. Used the same one as for IIImul.

Affects:
  DMULT, DMULTu, MADD, MADD_MM, MADDU, MADDU_MM, MSUB, MSUB_MM, MSUBU,
  MSUBU_MM, MULT, MULTu

Does not affect MULT_MM, MULTu_MM since they are currently miscategorised
as IIImul.

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

10 years agoReMat: fix overly cavalier attitude to sub-register indices
Tim Northover [Thu, 16 Jan 2014 12:29:55 +0000 (12:29 +0000)]
ReMat: fix overly cavalier attitude to sub-register indices

There are two attempted optimisations in reMaterializeTrivialDef, trying to
avoid promoting the size of a register too much when rematerializing.
Unfortunately, both appear to be flawed. First, we see if the original register
would have worked, but this is inadequate. Consider:

    v1 = SOMETHING (v1 is QQ)
    v2:Q0 = COPY v1:Q1 (v1, v2 are QQ)
    ...
    uses of v2

In this case even though v2 *could* be used directly as the output of
SOMETHING, this would set the wrong bits of the QQ register involved. The
correct rematerialization must be:

    v2:Q0_Q1 = SOMETHING (v2 promoted to QQQ)
    ...
    uses of v2:Q1_Q2

For the second optimisation, if the correct remat is "v2:idx = SOMETHING" then
we can't necessarily expect v2 itself to be valid for SOMETHING, but we do try
to hunt for a class between v1 and v2 that works. Unfortunately, this is also
wrong:

    v1 = SOMETHING (v1 is QQ)
    v2:Q0_Q1 = COPY v1 (v1 is QQ, v2 is QQQ)
    ...
    uses of v2 as a QQQ

The canonical rematerialization here is "v2:Q0_Q1 = SOMETHING". However current
logic would decide that v2 could be a QQ (no interest is taken in later uses).

This patch, therefore, always accepts the widened register class without trying
to be clever. Generally there is no penalty to this (e.g. in the common GR32 <
GR64 case, expanding the width doesn't matter because it's not like you were
going to do anything else with the high bits of a GR32 register). It can
increase register pressure in cases like the ARM VFP regs though (multiple
non-overlapping but equivalent subregisters). This situation can be
spotted by the fact that both source and destination in the
not-quite-coalesced pair have a sub-register index and
rematerialisation is skipped in that situation.

Unfortunately, no in-tree targets actually expose this as far as I can tell
(there are so few isAsCheapAsAMove instructions for it to trigger on) so I've
been unable to produce a test. It was exposed in our ARM64 SPEC tests though,
and I will be adding a test there that we should be able to contribute
soon(TM).

rdar://problem/15775279

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

10 years ago[asan] Remove -fsanitize-address-zero-base-shadow command line
Evgeniy Stepanov [Thu, 16 Jan 2014 10:19:12 +0000 (10:19 +0000)]
[asan] Remove -fsanitize-address-zero-base-shadow command line
flag from clang, and disable zero-base shadow support on all platforms
where it is not the default behavior.

- It is completely unused, as far as we know.
- It is ABI-incompatible with non-zero-base shadow, which means all
objects in a process must be built with the same setting. Failing to
do so results in a segmentation fault at runtime.
- It introduces a backward dependency of compiler-rt on user code,
which is uncommon and complicates testing.

This is the LLVM part of a larger change.

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

10 years agoFor ARM, fix assertuib failures for some ld/st 3/4 instruction with wirteback.
Jiangning Liu [Thu, 16 Jan 2014 09:16:13 +0000 (09:16 +0000)]
For ARM, fix assertuib failures for some ld/st 3/4 instruction with wirteback.

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

10 years agoAVX-512: fixed a compare pattern
Elena Demikhovsky [Thu, 16 Jan 2014 08:45:54 +0000 (08:45 +0000)]
AVX-512: fixed a compare pattern

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

10 years agoCopy segment register when optimizing to MOV8ao8/MOV16ao16/MOV32ao32.
Craig Topper [Thu, 16 Jan 2014 07:57:45 +0000 (07:57 +0000)]
Copy segment register when optimizing to MOV8ao8/MOV16ao16/MOV32ao32.

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

10 years agoAllow x86 mov instructions to/from memory with absolute address to be encoded and...
Craig Topper [Thu, 16 Jan 2014 07:36:58 +0000 (07:36 +0000)]
Allow x86 mov instructions to/from memory with absolute address to be encoded and disassembled with a segment override prefix. Fixes PR16962.

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

10 years agoUse a slightly smaller hack.
Rafael Espindola [Thu, 16 Jan 2014 07:36:00 +0000 (07:36 +0000)]
Use a slightly smaller hack.

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

10 years agoRevert r199361: Now, the sanitizer got the change
Quentin Colombet [Thu, 16 Jan 2014 07:29:07 +0000 (07:29 +0000)]
Revert r199361: Now, the sanitizer got the change

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

10 years ago[LTO] Modify lto.exports to force the sanitizer to rebuilt LTO.exports
Quentin Colombet [Thu, 16 Jan 2014 07:14:01 +0000 (07:14 +0000)]
[LTO] Modify lto.exports to force the sanitizer to rebuilt LTO.exports

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

10 years agoFix typo: : not ;
Bill Wendling [Thu, 16 Jan 2014 07:08:22 +0000 (07:08 +0000)]
Fix typo: : not ;

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

10 years agollmv-objdump/COFF: Print export table contents.
Rui Ueyama [Thu, 16 Jan 2014 07:05:49 +0000 (07:05 +0000)]
llmv-objdump/COFF: Print export table contents.

This patch adds the capability to dump export table contents. An example
output is this:

  Export Table:
   Ordinal      RVA  Name
         5   0x2008  exportfn1
         6   0x2010  exportfn2

By adding this feature to llvm-objdump, we will be able to use it to check
export table contents in LLD's tests. Currently we are doing binary
comparison in the tests, which is fragile and not readable to humans.

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

10 years agoCommentColumn is always 40. Simplify.
Rafael Espindola [Thu, 16 Jan 2014 07:04:11 +0000 (07:04 +0000)]
CommentColumn is always 40. Simplify.

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

10 years ago[cmake] Attempt to fix sanitizer buildbot.
Quentin Colombet [Thu, 16 Jan 2014 06:43:55 +0000 (06:43 +0000)]
[cmake] Attempt to fix sanitizer buildbot.
The generation of the native_export_file end up in
several different makefiles. All those makefiles
write the same file, but can be executed concurrently...
and bad things happen!

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

10 years agoConvert test to FileCheck.
Rafael Espindola [Thu, 16 Jan 2014 06:31:20 +0000 (06:31 +0000)]
Convert test to FileCheck.

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

10 years agoReapply r194218 with fix:
Bill Wendling [Thu, 16 Jan 2014 06:29:36 +0000 (06:29 +0000)]
Reapply r194218 with fix:

Move copying of global initializers below the cloning of functions.

The BlockAddress doesn't have access to the correct basic blocks until the
functions have been cloned. This causes the BlockAddress to point to the old
values. Just wait until the functions have been cloned before copying the
initializers.
PR13163

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

10 years agoRemove use of OpSize for populating VEX_PP field. A prefix encoding is now used inste...
Craig Topper [Thu, 16 Jan 2014 06:14:45 +0000 (06:14 +0000)]
Remove use of OpSize for populating VEX_PP field. A prefix encoding is now used instead. Simplify some other code. No functional changes intended.

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

10 years agoAttempt to fix the MSVC build.
Rafael Espindola [Thu, 16 Jan 2014 05:09:32 +0000 (05:09 +0000)]
Attempt to fix the MSVC build.

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

10 years agoBasicAA: We need to check both access sizes when comparing a gep and an
Arnold Schwaighofer [Thu, 16 Jan 2014 04:53:18 +0000 (04:53 +0000)]
BasicAA: We need to check both access sizes when comparing a gep and an
underlying object of unknown size.

Fixes PR18460.

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

10 years agoPrevent calls to __jit_debug_register_code from being optimized out.
Rafael Espindola [Thu, 16 Jan 2014 04:50:58 +0000 (04:50 +0000)]
Prevent calls to __jit_debug_register_code from being optimized out.

Patch by Andrew MacPherson. I just tweaked the comment.

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

10 years agoDon't use DataRefImpl to implement ImportDirectoryEntryRef.
Rui Ueyama [Thu, 16 Jan 2014 03:13:19 +0000 (03:13 +0000)]
Don't use DataRefImpl to implement ImportDirectoryEntryRef.

DataRefImpl (a union of two integers and a pointer) is not the ideal data type
to represent a reference to an import directory entity. We should just use the
pointer to the import table and an offset instead to simplify. No functionality
change.

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

10 years agoReport a warning when dropping outdated debug info metadata.
Manman Ren [Thu, 16 Jan 2014 01:51:12 +0000 (01:51 +0000)]
Report a warning when dropping outdated debug info metadata.

Use DiagnosticInfo to emit the warning.

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

10 years agoAdjust offsets for max load instruction offsets. This is more pessimistic
Reed Kotler [Thu, 16 Jan 2014 00:47:46 +0000 (00:47 +0000)]
Adjust offsets for max load instruction offsets. This is more pessimistic
than it needs to be by 1 bit but I need to finish some other things so
that all the boundary cases will work in that situation. constpool.c
in test-suite will fail to assemble under our new internal test-suite sync
without this change.

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

10 years agollvm-objdump: Don't print "Import table:" header if there's no import table.
Rui Ueyama [Wed, 15 Jan 2014 23:46:18 +0000 (23:46 +0000)]
llvm-objdump: Don't print "Import table:" header if there's no import table.

If a binary does not depend on any DLL, it does not contain import table at
all. Printing the section title without contents looks wrong, so we shouldn't
print it in that case.

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

10 years agoFix parsing of .symver directive on ARM
David Peixotto [Wed, 15 Jan 2014 22:40:02 +0000 (22:40 +0000)]
Fix parsing of .symver directive on ARM

ARM assembly syntax uses @ for a comment, execpt for the second
parameter of the .symver directive which requires @ as part of the
symbol name. This commit fixes the parsing of this directive by
adding a special case for ARM for this one argumnet.

To make the change we had to move the AllowAtInIdentifier variable
to the MCAsmLexer interface (from AsmLexer) and expose a setter for
the value.  The ELFAsmParser then toggles this value when parsing
the second argument to the .symver directive for a target that
uses @ as a comment symbol

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

10 years ago[LTO] Add a hook to map LLVM diagnostics into the clients of LTO.
Quentin Colombet [Wed, 15 Jan 2014 22:04:35 +0000 (22:04 +0000)]
[LTO] Add a hook to map LLVM diagnostics into the clients of LTO.

Add a hook in the C API of LTO so that clients of the code generator can set
their own handler for the LLVM diagnostics.
The handler is defined like this:
typedef void (*lto_diagnostic_handler_t)(lto_codegen_diagnostic_severity_t
severity, const char *diag, void *ctxt)
- severity says how bad this is.
- diag is a string that contains the diagnostic message.
- ctxt is the registered context for this handler.

This hook is more general than the lto_get_error_message, since this function
keeps only the latest message and can only be queried when something went wrong
(no warning for instance).

<rdar://problem/15517596>

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

10 years agoRemove support for armv7f slice. <rdar://problem/12478440>
Bob Wilson [Wed, 15 Jan 2014 21:44:14 +0000 (21:44 +0000)]
Remove support for armv7f slice. <rdar://problem/12478440>

This was never used for anything so we should just get rid of it.

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

10 years agoUse a heavier hammer when --enable-libcpp is passed to bypass the tests
Chandler Carruth [Wed, 15 Jan 2014 21:21:48 +0000 (21:21 +0000)]
Use a heavier hammer when --enable-libcpp is passed to bypass the tests
which catch buggy versions of libstdc++. While libc++ would pass them,
we don't actually update the state in the configure script to use libc++
when we pass --enable-libcpp, the logic for that is in the
Makefiles. So just completely skip the library test when that configure
flag is passed.

Hopefully this will be enough to fix the darwin bots at last, and thanks
to Duncan Smith for getting things set up so I can watch the bots myself
on lab.llvm.org and see any failures!

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

10 years agoUpdate test/CodeGen/X86/vbinop-simplify-bug.ll.
Andrea Di Biagio [Wed, 15 Jan 2014 20:16:14 +0000 (20:16 +0000)]
Update test/CodeGen/X86/vbinop-simplify-bug.ll.

Redirect the output of llc to /dev/null.

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

10 years ago[DAGCombiner] Fix a wrong check in method SimplifyVBinOp.
Andrea Di Biagio [Wed, 15 Jan 2014 19:51:32 +0000 (19:51 +0000)]
[DAGCombiner] Fix a wrong check in method SimplifyVBinOp.

This fixes a regression intruced by r199135.

Revision 199135 tried to simplify part of the logic in method
DAGCombiner::SimplifyVBinOp introducing calls to method BuildVectorSDNode::isConstant().

However, that revision wrongly changed the check performed by method
SimplifyVBinOp to identify dag nodes that can be folded.
Before revision 199135, that method only tried to simplify vector binary operations
if both operands were build_vector of Constant/ConstantFP/Undef only.

After revision 199135, method SimplifyVBinop tried to
simplify also vector binary operations with only one constant operand.

This fixes the problem restoring the old behavior of SimplifyVBinOp.

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

10 years agoReturn an ErrorOr<Binary *> from createBinary.
Rafael Espindola [Wed, 15 Jan 2014 19:37:43 +0000 (19:37 +0000)]
Return an ErrorOr<Binary *> from createBinary.

I did write a version returning ErrorOr<OwningPtr<Binary> >, but it is too
cumbersome to use without std::move. I will keep the patch locally and submit
when we switch to c++11.

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

10 years agoSink the autoconf check for sufficiently modern host toolchain below the
Chandler Carruth [Wed, 15 Jan 2014 19:19:13 +0000 (19:19 +0000)]
Sink the autoconf check for sufficiently modern host toolchain below the
enable flag that selects the C++ standard library to use with the host
toolchain. Otherwise we end up testing the wrong config.

I'm not really happy about this placement, but its pragmatic and should
unblock the Apple builders.

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

10 years agoUpdate the X86 assembler for .intel_syntax to accept
Kevin Enderby [Wed, 15 Jan 2014 19:05:24 +0000 (19:05 +0000)]
Update the X86 assembler for .intel_syntax to accept
the | and & bitwise operators.

rdar://15570412

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

10 years agoMake sure we create a new archive by deleting any stale ones first.
Rafael Espindola [Wed, 15 Jan 2014 16:56:57 +0000 (16:56 +0000)]
Make sure we create a new archive by deleting any stale ones first.

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

10 years agoLL and SC decoder method fix.
Zoran Jovanovic [Wed, 15 Jan 2014 13:17:33 +0000 (13:17 +0000)]
LL and SC decoder method fix.

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

10 years agoAdded support for LWU microMIPS instruction.
Zoran Jovanovic [Wed, 15 Jan 2014 13:01:18 +0000 (13:01 +0000)]
Added support for LWU microMIPS instruction.

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

10 years agoFix a bug in r199313 where I failed to restore CXXFLAGS. Doh! Not
Chandler Carruth [Wed, 15 Jan 2014 10:34:30 +0000 (10:34 +0000)]
Fix a bug in r199313 where I failed to restore CXXFLAGS. Doh! Not
*quite* ready to just slam C++11 on by default.

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

10 years agoAdd a check to configure that the libstdc++ selected by Clang isn't
Chandler Carruth [Wed, 15 Jan 2014 10:31:15 +0000 (10:31 +0000)]
Add a check to configure that the libstdc++ selected by Clang isn't
libstdc++v4.6. This is quite hard to test directly, so we test for it by
checking a known missing feature in that version that was added in v4.7.

This should prevent users from upgrading Clang but not GCC and hosting
with a too-old GCC's libstdc++ and getting strange and hard to debug
errors when we switch to C++11 by default.

Also, switch several of the macros I introduced to use AC_LANG_SOURCE
rather than AC_LANG_PROGRAM as we don't need configure's help writing
our main function (and we don't need such a function at all for most of
the tests).

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

10 years agoWinCOFF: Transform IR expressions featuring __ImageBase into image relative relocations
David Majnemer [Wed, 15 Jan 2014 09:16:42 +0000 (09:16 +0000)]
WinCOFF: Transform IR expressions featuring __ImageBase into image relative relocations

MSVC on x64 requires that we create image relative symbol
references to refer to RTTI data. Seeing as how there is no way to
explicitly make reference to a given relocation type in LLVM IR, pattern
match expressions of the form &foo - &__ImageBase.

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

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

10 years agoRevert 199262 - MCJIT remote still failing on ARM
Renato Golin [Wed, 15 Jan 2014 09:09:46 +0000 (09:09 +0000)]
Revert 199262 - MCJIT remote still failing on ARM

Disabling remote MCJIT tests on ARM again, as they're still failing when
self-hosting on ARM, despite all my tests. At least now we have more info
on what message it's breaking and what is going on. Investigating.

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

10 years agoRe-disable MCJIT remote tests on ARM
Renato Golin [Wed, 15 Jan 2014 09:09:39 +0000 (09:09 +0000)]
Re-disable MCJIT remote tests on ARM

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

10 years agoWhitespace.
NAKAMURA Takumi [Wed, 15 Jan 2014 08:21:38 +0000 (08:21 +0000)]
Whitespace.

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

10 years agoreplace LeakSanitizerIsTurnedOffForTheCurrentProcess with __lsan_is_turned_off, but...
Kostya Serebryany [Wed, 15 Jan 2014 07:59:37 +0000 (07:59 +0000)]
replace LeakSanitizerIsTurnedOffForTheCurrentProcess with __lsan_is_turned_off, but this time hide it under __has_feature(address_sanitizer); also include <sanitizer/lsan_interface.h>

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

10 years agoFixed identation.
Elena Demikhovsky [Wed, 15 Jan 2014 07:18:11 +0000 (07:18 +0000)]
Fixed identation.

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

10 years agoFix PR18449: SCEV needs more precise max BECount for multi-exit loop.
Andrew Trick [Wed, 15 Jan 2014 06:42:11 +0000 (06:42 +0000)]
Fix PR18449: SCEV needs more precise max BECount for multi-exit loop.

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

10 years agoAdd OpSize16 to the two byte forms of INC/DEC that we only use in 64-bit mode and...
Craig Topper [Wed, 15 Jan 2014 05:20:59 +0000 (05:20 +0000)]
Add OpSize16 to the two byte forms of INC/DEC that we only use in 64-bit mode and a 64-bit only LEA. Even though we'll not be in 16-bit mode when we use them it makes their tables consistent with their 32-bit counterparts.

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

10 years agoFor AArch64, lowering sext_inreg and generate optimized code by using SXTL.
Jiangning Liu [Wed, 15 Jan 2014 05:08:01 +0000 (05:08 +0000)]
For AArch64, lowering sext_inreg and generate optimized code by using SXTL.

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

10 years agoSimplify x86 disassembler table handling of when to use TYPE_Rv/TYPE_R16/TYPE_R32...
Craig Topper [Wed, 15 Jan 2014 05:02:02 +0000 (05:02 +0000)]
Simplify x86 disassembler table handling of when to use TYPE_Rv/TYPE_R16/TYPE_R32 now that HasOpSizePrefix only means 16-bit instructions.

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

10 years agoSwitch-to-lookup tables: set threshold to 3 cases
Hans Wennborg [Wed, 15 Jan 2014 05:00:27 +0000 (05:00 +0000)]
Switch-to-lookup tables: set threshold to 3 cases

There has been an old FIXME to find the right cut-off for when it's worth
analyzing and potentially transforming a switch to a lookup table.

The switches always have two or more cases. I could not measure any speed-up
by transforming a switch with two cases. A switch with three cases gets a nice
speed-up, and I couldn't measure any compile-time regression, so I think this
is the right threshold.

In a Clang self-host, this causes 480 new switches to be transformed,
and reduces the final binary size with 8 KB.

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

10 years agoCheck the error code and save a call to sys::fs::exists.
Rafael Espindola [Wed, 15 Jan 2014 04:49:50 +0000 (04:49 +0000)]
Check the error code and save a call to sys::fs::exists.

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

10 years agoLoopVectorize: Only strip casts from integer types when replacing symbolic
Arnold Schwaighofer [Wed, 15 Jan 2014 03:35:46 +0000 (03:35 +0000)]
LoopVectorize: Only strip casts from integer types when replacing symbolic
strides

Fixes PR18480.

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