oota-llvm.git
10 years agoExtend and simplify the sample profile input file.
Diego Novillo [Fri, 10 Jan 2014 23:23:51 +0000 (23:23 +0000)]
Extend and simplify the sample profile input file.

1- Use the line_iterator class to read profile files.

2- Allow comments in profile file. Lines starting with '#'
   are completely ignored while reading the profile.

3- Add parsing support for discriminators and indirect call samples.

   Our external profiler can emit more profile information that we are
   currently not handling. This patch does not add new functionality to
   support this information, but it allows profile files to provide it.

   I will add actual support later on (for at least one of these
   features, I need support for DWARF discriminators in Clang).

   A sample line may contain the following additional information:

   Discriminator. This is used if the sampled program was compiled with
   DWARF discriminator support
   (http://wiki.dwarfstd.org/index.php?title=Path_Discriminators). This
   is currently only emitted by GCC and we just ignore it.

   Potential call targets and samples. If present, this line contains a
   call instruction. This models both direct and indirect calls. Each
   called target is listed together with the number of samples. For
   example,

                    130: 7  foo:3  bar:2  baz:7

   The above means that at relative line offset 130 there is a call
   instruction that calls one of foo(), bar() and baz(). With baz()
   being the relatively more frequent call target.

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

4- Simplify format of profile input file.

   This implements earlier suggestions to simplify the format of the
   sample profile file. The symbol table is not necessary and function
   profiles do not need to know the number of samples in advance.

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

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

10 years agoPropagation of profile samples through the CFG.
Diego Novillo [Fri, 10 Jan 2014 23:23:46 +0000 (23:23 +0000)]
Propagation of profile samples through the CFG.

This adds a propagation heuristic to convert instruction samples
into branch weights. It implements a similar heuristic to the one
implemented by Dehao Chen on GCC.

The propagation proceeds in 3 phases:

1- Assignment of block weights. All the basic blocks in the function
   are initial assigned the same weight as their most frequently
   executed instruction.

2- Creation of equivalence classes. Since samples may be missing from
   blocks, we can fill in the gaps by setting the weights of all the
   blocks in the same equivalence class to the same weight. To compute
   the concept of equivalence, we use dominance and loop information.
   Two blocks B1 and B2 are in the same equivalence class if B1
   dominates B2, B2 post-dominates B1 and both are in the same loop.

3- Propagation of block weights into edges. This uses a simple
   propagation heuristic. The following rules are applied to every
   block B in the CFG:

   - If B has a single predecessor/successor, then the weight
     of that edge is the weight of the block.

   - If all the edges are known except one, and the weight of the
     block is already known, the weight of the unknown edge will
     be the weight of the block minus the sum of all the known
     edges. If the sum of all the known edges is larger than B's weight,
     we set the unknown edge weight to zero.

   - If there is a self-referential edge, and the weight of the block is
     known, the weight for that edge is set to the weight of the block
     minus the weight of the other incoming edges to that block (if
     known).

Since this propagation is not guaranteed to finalize for every CFG, we
only allow it to proceed for a limited number of iterations (controlled
by -sample-profile-max-propagate-iterations). It currently uses the same
GCC default of 100.

Before propagation starts, the pass builds (for each block) a list of
unique predecessors and successors. This is necessary to handle
identical edges in multiway branches. Since we visit all blocks and all
edges of the CFG, it is cleaner to build these lists once at the start
of the pass.

Finally, the patch fixes the computation of relative line locations.
The profiler emits lines relative to the function header. To discover
it, we traverse the compilation unit looking for the subprogram
corresponding to the function. The line number of that subprogram is the
line where the function begins. That becomes line zero for all the
relative locations.

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

10 years agoSpace formatting fix for r198966.
Tom Roeder [Fri, 10 Jan 2014 23:17:39 +0000 (23:17 +0000)]
Space formatting fix for r198966.

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

10 years agoConstant propagate MachineInstrClassName.
Roman Divacky [Fri, 10 Jan 2014 22:59:49 +0000 (22:59 +0000)]
Constant propagate MachineInstrClassName.

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

10 years agoFixing build break: should be in the if statement, not outside.
Tom Roeder [Fri, 10 Jan 2014 22:55:25 +0000 (22:55 +0000)]
Fixing build break: should be in the if statement, not outside.

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

10 years agoRestore the library dependency of LLVMgold on LTO; this was removed recently but
Tom Roeder [Fri, 10 Jan 2014 22:48:35 +0000 (22:48 +0000)]
Restore the library dependency of LLVMgold on LTO; this was removed recently but
is needed for LLVMgold to load in ld.

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

10 years agoAdd a note about the old asm printer being removed.
Rafael Espindola [Fri, 10 Jan 2014 22:06:26 +0000 (22:06 +0000)]
Add a note about the old asm printer being removed.

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

10 years agoAll backends use MC now.
Rafael Espindola [Fri, 10 Jan 2014 21:49:27 +0000 (21:49 +0000)]
All backends use MC now.

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

10 years agoUse the simpler version of sys::fs::remove when possible.
Rafael Espindola [Fri, 10 Jan 2014 21:40:29 +0000 (21:40 +0000)]
Use the simpler version of sys::fs::remove when possible.

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

10 years agoRemove remove_all. A compiler has no need for recursively deleting a directory.
Rafael Espindola [Fri, 10 Jan 2014 20:36:42 +0000 (20:36 +0000)]
Remove remove_all. A compiler has no need for recursively deleting a directory.

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

10 years agoLTO: whitespace changes
Duncan P. N. Exon Smith [Fri, 10 Jan 2014 20:24:35 +0000 (20:24 +0000)]
LTO: whitespace changes

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

10 years agoLoopVectorizer: Handle strided memory accesses by versioning
Arnold Schwaighofer [Fri, 10 Jan 2014 18:20:32 +0000 (18:20 +0000)]
LoopVectorizer: Handle strided memory accesses by versioning

 for (i = 0; i < N; ++i)
   A[i * Stride1] += B[i * Stride2];

We take loops like this and check that the symbolic strides 'Strided1/2' are one
and drop to the scalar loop if they are not.

This is currently disabled by default and hidden behind the flag
'enable-mem-access-versioning'.

radar://13075509

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

10 years agoSCEVRewriter: Optionally interpret constants in value map as SCEVConstant
Arnold Schwaighofer [Fri, 10 Jan 2014 18:20:29 +0000 (18:20 +0000)]
SCEVRewriter: Optionally interpret constants in value map as SCEVConstant

An upcoming loop vectorizer commit will want to replace a SCEVUnknown(Value*)
by a SCEVConstant. This commit modifies the SCEVParameterRewriter to support
this. The SCEVParameterRewriter constructor can optionally specify to follow
this behavior.

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

10 years agoAmending test/MC/ARM/thumb2-mclass.s to match its apparent original purpose (to test...
Artyom Skrobov [Fri, 10 Jan 2014 16:49:49 +0000 (16:49 +0000)]
Amending test/MC/ARM/thumb2-mclass.s to match its apparent original purpose (to test the ARMv6M/ARMv7M commonality), and creating a new test case for the differences between ARMv6M and ARMv7M

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

10 years agoMust not produce Tag_CPU_arch_profile for pre-ARMv7 cores (e.g. cortex-m0)
Artyom Skrobov [Fri, 10 Jan 2014 16:42:55 +0000 (16:42 +0000)]
Must not produce Tag_CPU_arch_profile for pre-ARMv7 cores (e.g. cortex-m0)

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

10 years agoARM: fix regression caused by r198914
Saleem Abdulrasool [Fri, 10 Jan 2014 16:22:47 +0000 (16:22 +0000)]
ARM: fix regression caused by r198914

The disassembler would no longer be able to disambiguage between the two
variants (explicit immediate #0 vs implicit, omitted #0) for the ldrt, strt,
ldrbt, strbt mnemonics as both versions indicated the disassembler routine.

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

10 years agoSilence unused variable warning for non-asserting builds that was introduced in r198937.
Kristof Beyls [Fri, 10 Jan 2014 14:20:45 +0000 (14:20 +0000)]
Silence unused variable warning for non-asserting builds that was introduced in r198937.

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

10 years agoUse 'w' instead of 'c' to represent the win32 mangling.
Rafael Espindola [Fri, 10 Jan 2014 13:42:12 +0000 (13:42 +0000)]
Use 'w' instead of 'c' to represent the win32 mangling.

This change was requested to avoid confusion if we ever support non windows coff
systems.

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

10 years agoMake sure -use-init-array has intended effect on all AArch64 ELF targets, not just...
Kristof Beyls [Fri, 10 Jan 2014 13:41:49 +0000 (13:41 +0000)]
Make sure -use-init-array has intended effect on all AArch64 ELF targets, not just linux.

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

10 years agoWhitespace.
NAKAMURA Takumi [Fri, 10 Jan 2014 11:12:01 +0000 (11:12 +0000)]
Whitespace.

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

10 years agoSink add_llvm_library(gtest_main) to UnitTestMain/CMakeLists.txt.
NAKAMURA Takumi [Fri, 10 Jan 2014 11:02:26 +0000 (11:02 +0000)]
Sink add_llvm_library(gtest_main) to UnitTestMain/CMakeLists.txt.

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

10 years agollvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Remove "REQUIRES:shell". This doesn...
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:52 +0000 (10:38 +0000)]
llvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Remove "REQUIRES:shell". This doesn't depend on shell's behavior.

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

10 years agollvm/test/ExecutionEngine/MCJIT/lit.local.cfg: Add "AMD64" in the host_arch list.
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:46 +0000 (10:38 +0000)]
llvm/test/ExecutionEngine/MCJIT/lit.local.cfg: Add "AMD64" in the host_arch list.

FIXME: We should not take CMake's ${CMAKE_SYSTEM_PROCESSOR}...

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

10 years agolli: Tweak CacheName not to contain DOS driveletter.
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:40 +0000 (10:38 +0000)]
lli: Tweak CacheName not to contain DOS driveletter.

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

10 years agolli: LLIObjectCache: Use llvm::sys::path to get dirname.
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:34 +0000 (10:38 +0000)]
lli: LLIObjectCache: Use llvm::sys::path to get dirname.

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

10 years agoWhitespace.
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:28 +0000 (10:38 +0000)]
Whitespace.

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

10 years agollvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Fix not to use %t.cachedir/%p.
NAKAMURA Takumi [Fri, 10 Jan 2014 10:38:23 +0000 (10:38 +0000)]
llvm/test/ExecutionEngine/MCJIT/load-object-a.ll: Fix not to use %t.cachedir/%p.

%p is like X:\foo\bar.

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

10 years agoreapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; this time...
Kostya Serebryany [Fri, 10 Jan 2014 08:05:42 +0000 (08:05 +0000)]
reapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; this time LeakSanitizerIsTurnedOffForTheCurrentProcess is used instead of __lsan_is_turned_off

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

10 years agoARM IAS: support #:{lower,upper}16: for GNU compatibility
Saleem Abdulrasool [Fri, 10 Jan 2014 04:38:40 +0000 (04:38 +0000)]
ARM IAS: support #:{lower,upper}16: for GNU compatibility

The GNU assembler supports prefixing the expression with a '#' to indiciate that
the value that is being moved is infact a constant.  This improves the
compatibility of the integrated assembler's parser for this.

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

10 years agoARM IAS: support GNU extension for ldrd, strd
Saleem Abdulrasool [Fri, 10 Jan 2014 04:38:35 +0000 (04:38 +0000)]
ARM IAS: support GNU extension for ldrd, strd

The GNU assembler has an extension that allows for the elision of the paired
register (dt2) for the LDRD and STRD mnemonics.  Add support for this in the
assembly parser.  Canonicalise the usage during the instruction parsing from
the specified version.

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

10 years agoARM IAS: support implicit immediate 0s for {LD,ST}R{B,}T
Saleem Abdulrasool [Fri, 10 Jan 2014 04:38:31 +0000 (04:38 +0000)]
ARM IAS: support implicit immediate 0s for {LD,ST}R{B,}T

The ARM ARM indicates the mnemonics as follows:

  ldrbt{<c>}{<q>} <Rt>, [<Rn>], {, #+/-<imm>}
  ldrt{<c>}{<q>} <Rt>, [<Rn>] {, #+/-<imm>}
  strbt{<c>}{<q>} <Rt>, [<Rn>] {, #<imm>}
  strt{<c>}{<q>} <Rt>, [<Rn>] {, #+/-<imm>}

This improves the parser to deal with the implicit immediate 0 for the mnemonics
as per the specification.

Thanks to Joerg Sonnenberger for the tests!

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

10 years ago[Sparc] Emit retl/ret instead of jmp instruction. It improves the readability of...
Venkatraman Govindaraju [Fri, 10 Jan 2014 02:55:27 +0000 (02:55 +0000)]
[Sparc] Emit retl/ret instead of jmp instruction. It improves the readability of the assembly generated.

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

10 years ago[Sparc] Add support for parsing jmpl instruction and make indirect call and jmp instr...
Venkatraman Govindaraju [Fri, 10 Jan 2014 01:48:17 +0000 (01:48 +0000)]
[Sparc] Add support for parsing jmpl instruction and make indirect call and jmp instructions as aliases to jmpl.

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

10 years agoRevert "Revert r198851, "Prototype of skeleton type units for fission""
David Blaikie [Fri, 10 Jan 2014 01:38:41 +0000 (01:38 +0000)]
Revert "Revert r198851, "Prototype of skeleton type units for fission""

This reverts commit r198865 which reverts r198851.

ASan identified a use-of-uninitialized of the DwarfTypeUnit::Ty variable
in skeleton type units.

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

10 years agoFix a bug with the ARM thumb2 CBNZ and CBNZ instructions that
Kevin Enderby [Fri, 10 Jan 2014 00:43:32 +0000 (00:43 +0000)]
Fix a bug with the ARM thumb2 CBNZ and CBNZ instructions that
branch to the next instruction.  This can not be encoded but can be
turned into a NOP.

rdar://15062072

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

10 years agoUpdate the developer policy to more clearly spell out the steps for
Chandler Carruth [Fri, 10 Jan 2014 00:08:34 +0000 (00:08 +0000)]
Update the developer policy to more clearly spell out the steps for
contributors to submit patches to the LLVM project. Thanks to Danny,
Chris, Alp, and others for reviewing.

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

10 years agoBitcode: Fix a typo in an assert
Justin Bogner [Thu, 9 Jan 2014 22:02:05 +0000 (22:02 +0000)]
Bitcode: Fix a typo in an assert

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

10 years ago[Sparc] Multiclass for loads/stores. No functionality change intended.
Venkatraman Govindaraju [Thu, 9 Jan 2014 21:49:18 +0000 (21:49 +0000)]
[Sparc] Multiclass for loads/stores. No functionality change intended.

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

10 years agoClean up an inconsistency in v7s feature default.
Evan Cheng [Thu, 9 Jan 2014 20:24:00 +0000 (20:24 +0000)]
Clean up an inconsistency in v7s feature default.

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

10 years agoAdd a unit test for the copy constructor.
Rafael Espindola [Thu, 9 Jan 2014 19:47:39 +0000 (19:47 +0000)]
Add a unit test for the copy constructor.

I would not normally add tests like these, but the copy constructor is not
used at all in our codebase with c++11, so having this tests might prevent
breaking the c++03 build again.

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

10 years agoRevert "Disable LeakSanitizer in TableGen binaries, see PR18325"
Alp Toker [Thu, 9 Jan 2014 19:40:55 +0000 (19:40 +0000)]
Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"

To declare or define reserved identifers is undefined behaviour in standard
C++. This needs to be addressed in compiler-rt before it can be used in LLVM.

See the list discussion for details.

This reverts commit r198858.

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

10 years agoRe-remove dead code.
Nadav Rotem [Thu, 9 Jan 2014 19:22:07 +0000 (19:22 +0000)]
Re-remove dead code.
This reverts r198854.

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

10 years agoUpdate example to be more idiomatic.
Rafael Espindola [Thu, 9 Jan 2014 14:40:43 +0000 (14:40 +0000)]
Update example to be more idiomatic.

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

10 years agoRevert r198851, "Prototype of skeleton type units for fission"
NAKAMURA Takumi [Thu, 9 Jan 2014 13:08:00 +0000 (13:08 +0000)]
Revert r198851, "Prototype of skeleton type units for fission"

It caused undefined behavior. DwarfTypeUnit::Ty might not be initialized properly, I guess.

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

10 years agoFixed old typo in ScalarEvolution, that caused wrong SCEVs zext operation.
Stepan Dyatkovskiy [Thu, 9 Jan 2014 12:26:12 +0000 (12:26 +0000)]
Fixed old typo in ScalarEvolution, that caused wrong SCEVs zext operation.
Detailed description is here:
http://llvm.org/bugs/show_bug.cgi?id=18000#c16

For participation in bugfix process special thanks to David Wiberg.

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

10 years ago[SystemZ] Fix RNSBG bug introduced by r197802
Richard Sandiford [Thu, 9 Jan 2014 11:28:53 +0000 (11:28 +0000)]
[SystemZ] Fix RNSBG bug introduced by r197802

The zext handling added in r197802 wasn't right for RNSBG.  This patch
restricts it to ROSBG, RXSBG and RISBG.  (The tests for RISBG were added
in r197802 since RISBG was the motivating example.)

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

10 years agoHandle masked rotate amounts
Richard Sandiford [Thu, 9 Jan 2014 10:56:42 +0000 (10:56 +0000)]
Handle masked rotate amounts

At the moment we expect rotates to have the form:

   (or (shl X, Y), (shr X, Z))

where Y == bitsize(X) - Z or Z == bitsize(X) - Y.  This form means that
the (or ...) is undefined for Y == 0 or Z == 0.  This undefinedness can
be avoided by using Y == (C * bitsize(X) - Z) & (bitsize(X) - 1) or
Z == (C * bitsize(X) - Y) & (bitsize(X) - 1) for any integer C
(including 0, the most natural choice).

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

10 years agoMatch the InstCombine form of rotates by X+C
Richard Sandiford [Thu, 9 Jan 2014 10:49:40 +0000 (10:49 +0000)]
Match the InstCombine form of rotates by X+C

InstCombine converts (sub 32, (add X, C)) into (sub 32-C, X),
so a rotate left of a 32-bit Y by X+C could appear as either:

   (or (shl Y, (add X, C)), (shr Y, (sub 32, (add X, C))))

without InstCombine or:

   (or (shl Y, (add X, C)), (shr Y, (sub 32-C, X)))

with it.

We already matched the first form.  This patch handles the second too.

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

10 years agoDisable LeakSanitizer in TableGen binaries, see PR18325
Kostya Serebryany [Thu, 9 Jan 2014 09:26:26 +0000 (09:26 +0000)]
Disable LeakSanitizer in TableGen binaries, see PR18325

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

10 years agoRevert r198819 - "Remove dead code."
Nadav Rotem [Thu, 9 Jan 2014 07:50:34 +0000 (07:50 +0000)]
Revert r198819 - "Remove dead code."

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

10 years agoFix accidental use of the exotic "std::string::back()" method. Turns out it's
Lang Hames [Thu, 9 Jan 2014 05:29:59 +0000 (05:29 +0000)]
Fix accidental use of the exotic "std::string::back()" method. Turns out it's
new in C++11.

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

10 years agoAdd an "-object-cache-dir=<string>" option to LLI. This option specifies the
Lang Hames [Thu, 9 Jan 2014 05:24:05 +0000 (05:24 +0000)]
Add an "-object-cache-dir=<string>" option to LLI. This option specifies the
root path to which object files managed by the LLIObjectCache instance should be
written. This option defaults to "", in which case objects are cached in the
same directory as the bitcode they are derived from.

The load-object-a.ll test has been rewritten to use this option to support
testing in environments where the test directory is not writable.

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

10 years agoPrototype of skeleton type units for fission
David Blaikie [Thu, 9 Jan 2014 05:08:28 +0000 (05:08 +0000)]
Prototype of skeleton type units for fission

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

10 years agollvm-dwarfdump: type unit dwo support
David Blaikie [Thu, 9 Jan 2014 05:08:24 +0000 (05:08 +0000)]
llvm-dwarfdump: type unit dwo support

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

10 years agollvm-readobj: address review comments for ARM EHABI printing
Saleem Abdulrasool [Thu, 9 Jan 2014 04:31:18 +0000 (04:31 +0000)]
llvm-readobj: address review comments for ARM EHABI printing

Rename bytecode to opcodes to make it more clear.  Change an impossible case to
llvm_unreachable instead.  Avoid allocation of a buffer by modifying the
PrintOpcodes iteration.

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

10 years agollvm-readobj: fix endianness
Saleem Abdulrasool [Thu, 9 Jan 2014 04:31:14 +0000 (04:31 +0000)]
llvm-readobj: fix endianness

Explicitly handle endianness to ensure that bytes are read properly on
big-endian systems.

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

10 years agoDwarfDebug: Refactor out common skeleton construction code to be reused for type...
David Blaikie [Thu, 9 Jan 2014 04:28:46 +0000 (04:28 +0000)]
DwarfDebug: Refactor out common skeleton construction code to be reused for type unit skeletons.

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

10 years agoExtend llvm::AlignedCharArrayUnion to support up to 10 arguments, as required by...
Richard Smith [Thu, 9 Jan 2014 03:28:55 +0000 (03:28 +0000)]
Extend llvm::AlignedCharArrayUnion to support up to 10 arguments, as required by Clang's APValue.

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

10 years agoReformatting for r198842
David Blaikie [Thu, 9 Jan 2014 03:24:13 +0000 (03:24 +0000)]
Reformatting for r198842

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

10 years agoDwarfUnit: Rename "Node" to "CUNode" and propagate it through DwarfTypeUnit as well.
David Blaikie [Thu, 9 Jan 2014 03:23:41 +0000 (03:23 +0000)]
DwarfUnit: Rename "Node" to "CUNode" and propagate it through DwarfTypeUnit as well.

Since we'll now also need the split dwarf file name along with the
language in DwarfTypeUnits, just use the whole DICompileUnit rather than
explicitly handling each field needed.

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

10 years agoRevert "DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only"
David Blaikie [Thu, 9 Jan 2014 03:03:27 +0000 (03:03 +0000)]
Revert "DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only"

This reverts commit r198830.

Decided to go a different way with this...

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

10 years ago[PM] Rename this source file to something a bit more generic before
Chandler Carruth [Thu, 9 Jan 2014 02:39:45 +0000 (02:39 +0000)]
[PM] Rename this source file to something a bit more generic before
I add support for the new pass manager to it.

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

10 years agoPut the functionality for printing a value to a raw_ostream as an
Chandler Carruth [Thu, 9 Jan 2014 02:29:41 +0000 (02:29 +0000)]
Put the functionality for printing a value to a raw_ostream as an
operand into the Value interface just like the core print method is.
That gives a more conistent organization to the IR printing interfaces
-- they are all attached to the IR objects themselves. Also, update all
the users.

This removes the 'Writer.h' header which contained only a single function
declaration.

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

10 years agoDwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only
David Blaikie [Thu, 9 Jan 2014 01:20:14 +0000 (01:20 +0000)]
DwarfUnit: Move the DICompileUnit Node to the DwarfCompileUnit only

It's unused in DwarfTypeUnit, as is expected.

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

10 years agoRemove the test for endianness in configure.ac and regenerate.
Eric Christopher [Thu, 9 Jan 2014 01:09:57 +0000 (01:09 +0000)]
Remove the test for endianness in configure.ac and regenerate.

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

10 years agoReplace fstream use with raw_fd_ostream.
Lang Hames [Thu, 9 Jan 2014 00:47:54 +0000 (00:47 +0000)]
Replace fstream use with raw_fd_ostream.

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

10 years agoRemove dead code.
Rafael Espindola [Thu, 9 Jan 2014 00:32:54 +0000 (00:32 +0000)]
Remove dead code.

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

10 years agoUse the existing typedef to avoid forming a reference to a reference.
Rafael Espindola [Thu, 9 Jan 2014 00:25:25 +0000 (00:25 +0000)]
Use the existing typedef to avoid forming a reference to a reference.

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

10 years agollvm.experimental.stackmap: fix encoding of large constants.
Andrew Trick [Thu, 9 Jan 2014 00:22:31 +0000 (00:22 +0000)]
llvm.experimental.stackmap: fix encoding of large constants.

In the stackmap format we advertise the constant field as signed.
However, we were determining whether to promote to a 64-bit constant
pool based on an unsigned comparison.

This fix allows -1 to be encoded as a small constant.

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

10 years agoSimplify/collapse/denest a conditions/blocks.
David Blaikie [Thu, 9 Jan 2014 00:13:35 +0000 (00:13 +0000)]
Simplify/collapse/denest a conditions/blocks.

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

10 years agollvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo equivalents
David Blaikie [Wed, 8 Jan 2014 23:29:59 +0000 (23:29 +0000)]
llvm-dwarfdump: reorder dwo sections to immediately proceed their non-dwo equivalents

This makes it easier to write a test that's mostly shared between
fission and non-fission (using FileCheck's multiple prefix support).

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

10 years agoFix the C++03 build.
Rafael Espindola [Wed, 8 Jan 2014 22:27:04 +0000 (22:27 +0000)]
Fix the C++03 build.

With c++11 we never instantiate the copy constructor.

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

10 years agoUse getError and remove the error_code operator.
Rafael Espindola [Wed, 8 Jan 2014 22:03:39 +0000 (22:03 +0000)]
Use getError and remove the error_code operator.

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

10 years agoRemove vestigal bits of MC from the mangler. It no longer uses this, and
Chandler Carruth [Wed, 8 Jan 2014 21:59:22 +0000 (21:59 +0000)]
Remove vestigal bits of MC from the mangler. It no longer uses this, and
having the include could cause weird layering problems between the IR
and MC libraries.

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

10 years agoConservatively handle multiple MMOs in MIsNeedChainEdge
Hal Finkel [Wed, 8 Jan 2014 21:52:02 +0000 (21:52 +0000)]
Conservatively handle multiple MMOs in MIsNeedChainEdge

MIsNeedChainEdge, which is used by -enable-aa-sched-mi (AA in misched), had an
llvm_unreachable when -enable-aa-sched-mi is enabled and we reach an
instruction with multiple MMOs. Instead, return a conservative answer. This
allows testing -enable-aa-sched-mi on x86.

Also, this moves the check above the isUnsafeMemoryObject checks.
isUnsafeMemoryObject is currently correct only for instructions with one MMO
(as noted in the comment in isUnsafeMemoryObject):

  // We purposefully do no check for hasOneMemOperand() here
  // in hope to trigger an assert downstream in order to
  // finish implementation.

The problem with this is that, had the candidate edge passed the
"!MIa->mayStore() && !MIb->mayStore()" check, the hoped-for assert would never
happen (which could, in theory, lead to incorrect behavior if one of these
secondary MMOs was volatile, for example).

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

10 years agoMove declaration of variables down to first use.
Matt Arsenault [Wed, 8 Jan 2014 21:47:14 +0000 (21:47 +0000)]
Move declaration of variables down to first use.

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

10 years agoAdd missing definitions of key_type and value_type to DenseSet.
Matt Arsenault [Wed, 8 Jan 2014 21:38:04 +0000 (21:38 +0000)]
Add missing definitions of key_type and value_type to DenseSet.

This matches std::set and allows using DenseSet with the functions
in SetOperations.h

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

10 years agoAdd get and getError methods to ErrorOr.
Rafael Espindola [Wed, 8 Jan 2014 21:17:09 +0000 (21:17 +0000)]
Add get and getError methods to ErrorOr.

ErrorOr is modeled after boost::optional which has a get method.

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

10 years ago[AArch64][NEON] Added UXTL and UXTL2 instruction aliases
Ana Pazos [Wed, 8 Jan 2014 21:02:13 +0000 (21:02 +0000)]
[AArch64][NEON] Added UXTL and UXTL2 instruction aliases

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

10 years agoForce emit a relocation for @gnu_indirect_function symbols so that the indirect
Roman Divacky [Wed, 8 Jan 2014 18:50:32 +0000 (18:50 +0000)]
Force emit a relocation for @gnu_indirect_function symbols so that the indirect
resolution works.

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

10 years ago[x86] Remove OpSize16 flag from MOV32r0
David Woodhouse [Wed, 8 Jan 2014 18:38:26 +0000 (18:38 +0000)]
[x86] Remove OpSize16 flag from MOV32r0

It's not a real instruction any more and doesn't need encoding information.

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

10 years agoTeach the DAGCombiner how to fold 'vselect' dag nodes according
Andrea Di Biagio [Wed, 8 Jan 2014 18:33:04 +0000 (18:33 +0000)]
Teach the DAGCombiner how to fold 'vselect' dag nodes according
to the following two rules:
  1) fold (vselect (build_vector AllOnes), A, B) -> A
  2) fold (vselect (build_vector AllZeros), A, B) -> B

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

10 years agoAdd missing rename from the previous commit.
Rafael Espindola [Wed, 8 Jan 2014 17:56:46 +0000 (17:56 +0000)]
Add missing rename from the previous commit.

No idea how this was compiling locally. Found by the bots.

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

10 years agoRename get to getStorage and getError to getErrorStorage.
Rafael Espindola [Wed, 8 Jan 2014 17:43:26 +0000 (17:43 +0000)]
Rename get to getStorage and getError to getErrorStorage.

These private functions return pointers to the internal storage.

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

10 years agoAdd missing test case for r198737.
Lang Hames [Wed, 8 Jan 2014 16:31:16 +0000 (16:31 +0000)]
Add missing test case for r198737.

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

10 years agoRemove mention of old deleted test scripts from testing guide
Nico Rieck [Wed, 8 Jan 2014 16:30:03 +0000 (16:30 +0000)]
Remove mention of old deleted test scripts from testing guide

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

10 years ago[DAGCombiner] Factor duplicated rotate code into a separate function
Richard Sandiford [Wed, 8 Jan 2014 15:40:47 +0000 (15:40 +0000)]
[DAGCombiner] Factor duplicated rotate code into a separate function

No functional change intended.

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

10 years agolit: Provide file location in cfg error messages
Alp Toker [Wed, 8 Jan 2014 14:20:59 +0000 (14:20 +0000)]
lit: Provide file location in cfg error messages

Python doesn't do a good job at diagnosing string exec() so use execfile()
where available.

This should be a timesaver when trying to get to the bottom of build bot
failures.

Before:

    File "llvm/utils/lit/lit/TestingConfig.py", line 93, in load_from_path
      exec("exec data in cfg_globals")
    File "<string>", line 1, in <module>
    File "<string>", line 194, in <module>
  NameError: name 'typo' is not defined

After:

    File "llvm/utils/lit/lit/TestingConfig.py", line 95, in load_from_path
    execfile(path, cfg_globals)
    File "clang/test/lit.cfg", line 194, in <module>
      typo
      ^~~~
  NameError: name 'typo' is not defined

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

10 years ago[x86] Support R_386_PC8, R_386_PC16 and R_X86_64_PC8
David Woodhouse [Wed, 8 Jan 2014 12:58:40 +0000 (12:58 +0000)]
[x86] Support R_386_PC8, R_386_PC16 and R_X86_64_PC8

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

10 years ago[x86] Add JMP_2 and other 16-bit PC-relative branch instructions
David Woodhouse [Wed, 8 Jan 2014 12:58:36 +0000 (12:58 +0000)]
[x86] Add JMP_2 and other 16-bit PC-relative branch instructions

Mark them as requiring 16-bit mode for now, since we don't yet have
relaxation support for FK_Data_2.

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

10 years ago[x86] Do not relax PUSHi16 to PUSHi32 (PR18414)
David Woodhouse [Wed, 8 Jan 2014 12:58:32 +0000 (12:58 +0000)]
[x86] Do not relax PUSHi16 to PUSHi32 (PR18414)

They do *different* things to %esp, so they are not equivalent.

Rename PUSHi8 to PUSH32i8 and add the missing PUSH16i8.

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

10 years ago[x86] Make AsmParser validate registers for memory operands a bit better
David Woodhouse [Wed, 8 Jan 2014 12:58:28 +0000 (12:58 +0000)]
[x86] Make AsmParser validate registers for memory operands a bit better

We can't do a perfect job here. We *have* to allow (%dx) even in 64-bit
mode, for example, because it might be used for an unofficial form of
the in/out instructions. We actually want to do a better job of validation
*later*. Perhaps *instead* of doing it where we are at the moment.

But for now, doing what validation we *can* do in the place that the code
already has its validation, is an improvement.

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

10 years ago[x86] Fix MOV8ao8 et al for 16-bit mode, fix up disassembler to understand
David Woodhouse [Wed, 8 Jan 2014 12:58:24 +0000 (12:58 +0000)]
[x86] Fix MOV8ao8 et al for 16-bit mode, fix up disassembler to understand

It seems there is no separate instruction class for having AdSize *and*
OpSize bits set, which is required in order to disambiguate between all
these instructions. So add that to the disassembler.

Hm, perhaps we do need an AdSize16 bit after all?

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

10 years ago[x86] Use 16-bit addressing where possible in 16-bit mode
David Woodhouse [Wed, 8 Jan 2014 12:58:18 +0000 (12:58 +0000)]
[x86] Use 16-bit addressing where possible in 16-bit mode

Where "where possible" means that it's an immediate value and it's below
0x10000. In fact GAS will either truncate or error with larger values,
and will insist on using the addr32 prefix to get 32-bit addressing. So
perhaps we should do that, in a later patch.

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

10 years ago[x86] Fix JCXZ,JECXZ_32 for 16-bit mode
David Woodhouse [Wed, 8 Jan 2014 12:58:12 +0000 (12:58 +0000)]
[x86] Fix JCXZ,JECXZ_32 for 16-bit mode

JCXZ should have the 0x67 prefix only if we're in 32-bit mode, so make that
appropriately conditional. And JECXZ needs the prefix instead.

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

10 years ago[x86] Disambiguate RET[QL] and fix aliases for 16-bit mode
David Woodhouse [Wed, 8 Jan 2014 12:58:07 +0000 (12:58 +0000)]
[x86] Disambiguate RET[QL] and fix aliases for 16-bit mode

I couldn't see how to do this sanely without splitting RETQ from RETL.

Eric says: "sad about the inability to roundtrip them now, but...".
I have no idea what that means, but perhaps it wants preserving in the
commit comment.

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

10 years ago[x86] Disambiguate [LS][IG]DT{32,64}m and add 16-bit versions, fix aliases
David Woodhouse [Wed, 8 Jan 2014 12:57:55 +0000 (12:57 +0000)]
[x86] Disambiguate [LS][IG]DT{32,64}m and add 16-bit versions, fix aliases

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

10 years ago[x86] Add JMP16[rm],CALL16[rm] instructions, and fix up aliases
David Woodhouse [Wed, 8 Jan 2014 12:57:49 +0000 (12:57 +0000)]
[x86] Add JMP16[rm],CALL16[rm] instructions, and fix up aliases

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

10 years ago[x86] Add PUSHA16,POPA16 instructions, and fix aliases for 16-bit mode
David Woodhouse [Wed, 8 Jan 2014 12:57:45 +0000 (12:57 +0000)]
[x86] Add PUSHA16,POPA16 instructions, and fix aliases for 16-bit mode

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

10 years ago[x86] Add OpSize16 to instructions that need it
David Woodhouse [Wed, 8 Jan 2014 12:57:40 +0000 (12:57 +0000)]
[x86] Add OpSize16 to instructions that need it

This fixes the bulk of 16-bit output, and the corresponding test case
x86-16.s now looks mostly like the x86-32.s test case that it was
originally based on. A few irrelevant instructions have been dropped,
and there are still some corner cases to be fixed in subsequent patches.

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