Commit Graph

158725 Commits

Author SHA1 Message Date
Jack Carter 8ff70e3e26 [mips][msa] Direct Object Emission for I8 instructions.
This patch adds Direct Object Emission support for I8 instructions: andi.b, bmnzi.b, bmzi.b, bseli.b, nori.b, ori.b, shf.{b,h,w} and xori.b.


Patch by Matheus Almeida

llvm-svn: 191688
2013-09-30 18:05:18 +00:00
Jack Carter c3b25686b9 [mips][msa] Direct Object Emission for I5 instructions.
This patch adds Direct Object Emission support for I5 instructions: addvi.{b,h,w,d}, ceqi.{b,h,w,d}, clei_s.{b,h,w,d}, clei_u.{b,h,w,d}, clti_s.{b,h,w,d}, clti_u.{b,h,w,d}, maxi_s.{b,h,w,d}, maxi_u.{b,h,w,d}, mini_s.{b,h,w,d}, mini_u.{b,h,w,d}, subvi.{b,h,w,d}.


Patch by Matheus Almeida

llvm-svn: 191687
2013-09-30 17:58:07 +00:00
Tilmann Scheller be904775d2 [ARM] Clean up ARMAsmParser::validateInstruction().
Fix some LLVM Coding Standards violations.

No changes in functionality.

llvm-svn: 191686
2013-09-30 17:57:30 +00:00
Jack Carter 92e6e0f171 [mips][msa] Direct Object Emission for 2R instructions.
This patch adds Direct Object Emission support for 2R instructions: nloc.{b,h,w}, nlzc.{b,h,w}, pcnt.{b,w,d}.  


Patch by Matheus Almeida

llvm-svn: 191685
2013-09-30 17:52:33 +00:00
Jack Carter 6eed9cc6a8 [PATCH 1/4] [mips][msa] Source register of FILL instructions is GPR
and not an MSA register

Patch by Matheus Almeida

llvm-svn: 191684
2013-09-30 17:43:04 +00:00
Tilmann Scheller 0e1dd8c176 [ARM] Use FileCheck instead of grep for ARM LDRD negative tests.
llvm-svn: 191683
2013-09-30 17:31:26 +00:00
David Blaikie 8b03ef8388 Remove unused variable introduced in 191666
llvm-svn: 191682
2013-09-30 17:30:41 +00:00
Yunzhong Gao f4e0b1047a Adding intrinsics to the clang front end for the x86 TBM instruction set.
Differential Revision: http://llvm-reviews.chandlerc.com/D1751

llvm-svn: 191681
2013-09-30 17:25:14 +00:00
Rafael Espindola 0b385c77f7 Move command line options to the users of libLTO. Fixes --enable-shared build.
Patch by Richard Sandiford.

llvm-svn: 191680
2013-09-30 16:39:19 +00:00
Rafael Espindola cbef8e60e3 Revert "Enable building LTO on WIN32."
This reverts commit r191670.

It was causing build failures on the msvc bots:

http://bb.pgr.jp/builders/ninja-clang-i686-msc17-R/builds/5166/steps/compile/logs/stdio

llvm-svn: 191679
2013-09-30 16:32:51 +00:00
Tilmann Scheller 255722beb8 [ARM] Assembler: ARM LDRD with writeback requires the base register to be different from the destination registers.
See ARM ARM A8.8.72.

Violating this constraint results in unpredictable behavior.

llvm-svn: 191678
2013-09-30 16:11:48 +00:00
Arnold Schwaighofer 66eb921a82 Swift model: Fix uop description on some writes
Those writes really need two/three uops.

llvm-svn: 191677
2013-09-30 15:56:34 +00:00
Benjamin Kramer f00472908a BoundsChecking: Fix refacto.
llvm-svn: 191676
2013-09-30 15:52:50 +00:00
Benjamin Kramer 6e931528fe Convert manual insert point restores to the new RAII object.
llvm-svn: 191675
2013-09-30 15:40:17 +00:00
Benjamin Kramer 6748576a0d InstCombine: Replace manual fast math flag copying with the new IRBuilder RAII helper.
Defines away the issue where cast<Instruction> would fail because constant
folding happened. Also slightly cleaner.

llvm-svn: 191674
2013-09-30 15:39:59 +00:00
Benjamin Kramer d36f1abefd IRBuilder: Add RAII objects to reset insertion points or fast math flags.
Inspired by the object from the SLPVectorizer. This found a minor bug in the
debug loc restoration in the vectorizer where the location of a following
instruction was attached instead of the location from the original instruction.

llvm-svn: 191673
2013-09-30 15:39:48 +00:00
Benjamin Kramer 1dc83cb6f7 IRBuilder: Move fast math flags to IRBuilderBase.
They don't depend on the templated stuff.

llvm-svn: 191672
2013-09-30 15:39:27 +00:00
Arnold Schwaighofer d2f96b91ca IfConverter: Use TargetSchedule for instruction latencies
For targets that have instruction itineraries this means no change. Targets
that move over to the new schedule model will use be able the new schedule
module for instruction latencies in the if-converter (the logic is such that if
there is no itineary we will use the new sched model for the latencies).

Before, we queried "TTI->getInstructionLatency()" for the instruction latency
and the extra prediction cost. Now, we query the TargetSchedule abstraction for
the instruction latency and TargetInstrInfo for the extra predictation cost. The
TargetSchedule abstraction will internally call "TTI->getInstructionLatency" if
an itinerary exists, otherwise it will use the new schedule model.

ATTENTION: Out of tree targets!

(I will also send out an email later to LLVMDev)

This means, if your target implements

 unsigned getInstrLatency(const InstrItineraryData *ItinData,
                          const MachineInstr *MI,
                          unsigned *PredCost);

and returns a value for "PredCost", you now also need to implement

 unsigned getPredictationCost(const MachineInstr *MI);

(if your target uses the IfConversion.cpp pass)

radar://15077010

llvm-svn: 191671
2013-09-30 15:28:56 +00:00
Rafael Espindola e693181c10 Enable building LTO on WIN32.
Enable building the LTO library (.lib and.dll) and llvm-lto.exe on Windows with
MSVC and Mingw as well as re-enabling the associated test.

Patch by Greg Bedwell!

llvm-svn: 191670
2013-09-30 15:28:14 +00:00
Edwin Vane 6afb68408d Fix build by adding dep on TransformUtils
clang-apply-replacements unittest Makefile wasn't linking in TransformUtils.

llvm-svn: 191669
2013-09-30 14:29:28 +00:00
Joey Gouly d51a35c6a0 Fix a bug in InstCombine where it attempted to cast a Value* to an Instruction*
when it was actually a Constant*.

There are quite a few other casts to Instruction that might have the same problem,
but this is the only one I have a test case for.

llvm-svn: 191668
2013-09-30 14:18:35 +00:00
Edwin Vane 59d93af4a5 clang-apply-replacements: Add code formatting functionality
The tool now supports a collection of arguments to turn on and provide settings
for the formatting of code affected by applying replacements:
* --format turns on formatting (default style is LLVM)
* --style controls code style settings
* --style-config allows one to explicitly indicate where a style config file
  lives.

The libclangApplyReplacements interface has a new function to turn Replacements
into Ranges to be used with tooling::reformat().

llvm-svn: 191667
2013-09-30 13:59:21 +00:00
Edwin Vane d544aa79c9 Moving style option formatting to libFormat
The help text for clang-format's -style option and the function that processes
its value is moved to libFormat in this patch. The goal is to enable other
tools that use libFormat and also have a -style option to behave consistently
with clang-format.

llvm-svn: 191666
2013-09-30 13:31:48 +00:00
Manuel Klimek 5843add31e Fix use-after-free.
TemplateDeclInstantiator takes the MultiLevelArgumentList by const-ref
and stores a const-ref member. Thus, we must not pass a temporary
into the constructor.

llvm-svn: 191665
2013-09-30 13:29:01 +00:00
Tilmann Scheller 38c4ef68d8 [ARM] Assembler: Add more negative tests for ARM LDRD.
llvm-svn: 191664
2013-09-30 13:04:22 +00:00
Richard Sandiford a25f268c25 [SystemZ] Revert r191661: Add definitions of LFH and STFH
For some reason, adding definitions for these load and store
instructions changed whether some of the build bots matched
comparisons as signed or unsigned.

llvm-svn: 191663
2013-09-30 12:01:35 +00:00
Alexey Samsonov 3b54a83d26 [LSan] Rework r191522 - treat allocations with short stack traces as live
llvm-svn: 191662
2013-09-30 10:57:56 +00:00
Richard Sandiford d30ac3a125 [SystemZ] Add definitions of LFH and STFH
llvm-svn: 191661
2013-09-30 10:50:33 +00:00
Richard Sandiford f9496060f6 [SystemZ] Add GRH32 for the high word of a GR64
The only thing this does on its own is make the definitions of RISB[HL]G
a bit more precise.  Those instructions are only used by the MC layer at
the moment, so no behavioral change is intended.  The class is needed by
later patches though.

llvm-svn: 191660
2013-09-30 10:45:16 +00:00
Richard Sandiford 87a4436456 [SystemZ] Rename subregs and add subreg_h32
Use subreg_hNN and subreg_lNN for the high and low NN bits of a register.
List the low registers first, so that subreg_l32 also means the low 32
bits of a 128-bit register.

Floats are stored in the upper 32 bits of a 64-bit register, so they
should use subreg_h32 rather than subreg_l32.

No behavioral change intended.

llvm-svn: 191659
2013-09-30 10:28:35 +00:00
Daniel Sanders cc0a056b3d [mips] Fix a broken link to mips.com in the documentation.
It now points to the equivalent page on imgtec.com

llvm-svn: 191658
2013-09-30 09:35:37 +00:00
Alexey Samsonov 1859544071 [CMake] Put libcxx-specific module directories to the front of CMAKE_MODULE_PATH.
Otherwise if libcxx is built as an LLVM external project (after r191624),
"include(config-ix)" will include config-ix.cmake from LLVM, not from libcxx,
which will result in misconfigured build tree.

llvm-svn: 191657
2013-09-30 09:10:01 +00:00
Richard Sandiford ddec3e421b [SystemZ] Add change missing from previous commit
llvm-svn: 191656
2013-09-30 08:54:17 +00:00
Richard Sandiford 7789b0828a [SystemZ] Rename 32-bit GPR registers
I'm about to add support for high-word operations, so it seemed better
for the low-word registers to have names like R0L rather than R0W.
No behavioral change intended.

llvm-svn: 191655
2013-09-30 08:48:38 +00:00
Daniel Jasper eabede6d1b clang-format: Improve alignment after 'return'.
Previously, comments, could totally confuse it.

Before:
  return
             // true if code is one of a or b.
             code == a ||
         code == b;

After:
  return
      // true if code is one of a or b.
      code == a || code == b;

llvm-svn: 191654
2013-09-30 08:29:03 +00:00
Chandler Carruth 92bd47aaa5 Add a bunch of other GCC '-f' options and ignore them. This covers every
such option I've been able to find in the wild in our build system.

Note that I haven't added test cases for this. I can do so if folks
want, but they're *really* boring considering that this is all generated
code to parse and ignore unsued options.

llvm-svn: 191653
2013-09-30 07:46:08 +00:00
Craig Topper 009de6015f Filter out repeated sections from the X86 disassembler modRMTable. Saves about ~43K from a released build. Unfortunately the disassembler tables are still upwards of 800K.
llvm-svn: 191652
2013-09-30 06:23:19 +00:00
Chandler Carruth 2196c4256d Switch one of the ignored boolean flag multiclasses to not have an 'f'
prefix. Sort the ignored boolean 'f' flags at the bottom of this file.
No functionality changed.

llvm-svn: 191651
2013-09-30 03:55:06 +00:00
Craig Topper 93a3d5973d Add a few more FMA4 disassembler test cases to match the scalar set with regards to combinations of L and W-bits.
llvm-svn: 191650
2013-09-30 02:50:51 +00:00
Craig Topper ed59dd34fd Various x86 disassembler fixes.
Add VEX_LIG to scalar FMA4 instructions.
Use VEX_LIG in some of the inheriting checks in disassembler table generator.
Make use of VEX_L_W, VEX_L_W_XS, VEX_L_W_XD contexts.
Don't let VEX_L_W, VEX_L_W_XS, VEX_L_W_XD, VEX_L_W_OPSIZE inherit from their non-L forms unless VEX_LIG is set.
Let VEX_L_W, VEX_L_W_XS, VEX_L_W_XD, VEX_L_W_OPSIZE inherit from all of their non-L or non-W cases.
Increase ranking on VEX_L_W, VEX_L_W_XS, VEX_L_W_XD, VEX_L_W_OPSIZE so they get chosen over non-L/non-W forms.

llvm-svn: 191649
2013-09-30 02:46:36 +00:00
NAKAMURA Takumi 6d18236d37 SemaTemplateDeduction.cpp: Suppress a warning. [-Wunused-variable]
llvm-svn: 191648
2013-09-30 00:14:27 +00:00
Faisal Vali 98b8e18379 Revert the linkage fix.
I got a bunch of buildbot failures that i don't understand - sorry.

llvm-svn: 191647
2013-09-29 20:27:06 +00:00
Faisal Vali f9a9af3c3d Remove an unnecessary overload from ASTLambda.h
As Richard pointed out to me, dyn_cast is very cheap - there is no real benefit from adding cluttery overloads to only avoid that cast.
No functionality change.

llvm-svn: 191646
2013-09-29 20:15:45 +00:00
Faisal Vali db29268b10 Fix computation of linkage within nested lambdas.
When nested lambdas are used in NSDMI's - this prevents infinite recursion.

See http://llvm-reviews.chandlerc.com/D1783 for Doug's approval regarding the code, and then request for some tests.

[On a related note, I need this patch so as to pass tests of transformations of nested lambdas returned from member functions]

llvm-svn: 191645
2013-09-29 20:00:15 +00:00
Benjamin Kramer 155c9d5d97 ObjectSizeOffsetEvaluator: Don't run into infinite recursion if we have a cyclic GEP.
Those can occur in dead code. PR17402.

llvm-svn: 191644
2013-09-29 19:39:13 +00:00
Benjamin Kramer 8814430539 Remove an old workaround for a compiler that EOL'd years ago.
llvm-svn: 191643
2013-09-29 19:39:02 +00:00
Manuel Klimek 7491eaa24d Add section on VS integration to the ClangFormat documentation.
llvm-svn: 191642
2013-09-29 17:49:50 +00:00
Faisal Vali 850da1a3a2 Fix windows newlines :(
llvm-svn: 191641
2013-09-29 17:08:32 +00:00
Daniel Jasper 6e16d54266 Fix misspelling of -fmodules-decluse.
llvm-svn: 191640
2013-09-29 12:40:54 +00:00
Daniel Jasper 0b1f76b658 clang-format: Fix assertion on incomplete string literals.
Before, this could would lead to an assert:
  llvm::errs() << "
               << a;

llvm-svn: 191639
2013-09-29 12:02:57 +00:00