Commit Graph

74168 Commits

Author SHA1 Message Date
Evan Cheng 3a79225b4c Rename createCodeEmitter to createMCCodeEmitter; createObjectStreamer to createMCObjectStreamer.
llvm-svn: 136031
2011-07-26 00:42:34 +00:00
Chandler Carruth f1af0902cc Remove a file from CMakeLists.txt that Evan removed in r136027.
llvm-svn: 136030
2011-07-26 00:30:33 +00:00
Evan Cheng 1142444565 Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser.
llvm-svn: 136027
2011-07-26 00:24:13 +00:00
Chandler Carruth 35c383eca4 Still more library dependency updates. This reflects the ever decreasing
dependence on CodeGen layers and backends from the MC layers.

llvm-svn: 136024
2011-07-26 00:09:11 +00:00
Chandler Carruth 97c069c1d2 Clean up a pile of hacks in our CMake build relating to TableGen.
The first problem to fix is to stop creating synthetic *Table_gen
targets next to all of the LLVM libraries. These had no real effect as
CMake specifies that add_custom_command(OUTPUT ...) directives (what the
'tablegen(...)' stuff expands to) are implicitly added as dependencies
to all the rules in that CMakeLists.txt.

These synthetic rules started to cause problems as we started more and
more heavily using tablegen files from *subdirectories* of the one where
they were generated. Within those directories, the set of tablegen
outputs was still available and so these synthetic rules added them as
dependencies of those subdirectories. However, they were no longer
properly associated with the custom command to generate them. Most of
the time this "just worked" because something would get to the parent
directory first, and run tablegen there. Once run, the files existed and
the build proceeded happily. However, as more and more subdirectories
have started using this, the probability of this failing to happen has
increased. Recently with the MC refactorings, it became quite common for
me when touching a large enough number of targets.

To add insult to injury, several of the backends *tried* to fix this by
adding explicit dependencies back to the parent directory's tablegen
rules, but those dependencies didn't work as expected -- they weren't
forming a linear chain, they were adding another thread in the race.

This patch removes these synthetic rules completely, and adds a much
simpler function to declare explicitly that a collection of tablegen'ed
files are referenced by other libraries. From that, we can add explicit
dependencies from the smaller libraries (such as every architectures
Desc library) on this and correctly form a linear sequence. All of the
backends are updated to use it, sometimes replacing the existing attempt
at adding a dependency, sometimes adding a previously missing dependency
edge.

Please let me know if this causes any problems, but it fixes a rather
persistent and problematic source of build flakiness on our end.

llvm-svn: 136023
2011-07-26 00:09:08 +00:00
Jim Grosbach 9becc53e32 ARM assembly parsing and encoding for SSAX, SSUB16 and SSUB8.
llvm-svn: 136013
2011-07-25 23:32:14 +00:00
Evan Cheng 215b3fd42e TargetAsmBackend has been renamed to MCAsmBackend.
llvm-svn: 136012
2011-07-25 23:28:36 +00:00
Evan Cheng 5928e69d20 Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to createMCAsmBackend.
llvm-svn: 136010
2011-07-25 23:24:55 +00:00
Eli Friedman fee02c6c13 Initial implementation of 'fence' instruction, the new C++0x-style replacement for llvm.memory.barrier.
This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon.

llvm-svn: 136009
2011-07-25 23:16:38 +00:00
Nick Lewycky 15e2d90746 Finish adding support for lifetime intrinsics to SROA. Fixes PR10121!
llvm-svn: 136008
2011-07-25 23:14:22 +00:00
Benjamin Kramer 9ea35e470c I will save before I commit.
I will save before I commit.
I will save before I commit.
I will save before I commit.

llvm-svn: 136007
2011-07-25 23:10:23 +00:00
Jim Grosbach 475c6dbef6 ARM assembly parsing and encoding for SSAT16 instruction.
llvm-svn: 136006
2011-07-25 23:09:14 +00:00
Bruno Cardoso Lopes 9212bf275d Codegen allonesvector better while using AVX: vpcmpeqd + vinsertf128
This also fixes PR10452

llvm-svn: 136004
2011-07-25 23:05:32 +00:00
Bruno Cardoso Lopes ec21941de0 Add remaining 256-bit vector bitcasts. This also fixes PR10451
llvm-svn: 136003
2011-07-25 23:05:28 +00:00
Bruno Cardoso Lopes 123dff0f58 - Handle special scalar_to_vector case: splats. Using a native 128-bit
shuffle before inserting on a 256-bit vector.
- Add AVX versions of movd/movq instructions
- Introduce a few COPY patterns to match insert_subvector instructions.
This turns a trivial insert_subvector instruction into a register copy,
coalescing the xmm into a ymm and avoid emiting on more instruction.

llvm-svn: 136002
2011-07-25 23:05:25 +00:00
Bruno Cardoso Lopes 276eb8debf Reintroduce r135730, this is indeed the right approach, there is no
native 256-bit vector instruction to do scalar_to_vector.

llvm-svn: 136001
2011-07-25 23:05:16 +00:00
Benjamin Kramer bf11531492 llvm-objdump: Ignore unreachable blocks when printing the CFG.
llvm-svn: 136000
2011-07-25 23:04:36 +00:00
Evan Cheng 1740a97734 Fix include guards.
llvm-svn: 135998
2011-07-25 22:52:04 +00:00
Benjamin Kramer c956033947 Add a note about efficient codegen for binary log.
llvm-svn: 135996
2011-07-25 22:30:00 +00:00
Eli Friedman 442d1b199f Attempt to fix test failure reported on llvm-commits.
llvm-svn: 135995
2011-07-25 22:28:51 +00:00
Jakub Staszak e92d047b51 BranchProbability::print returns void now.
llvm-svn: 135994
2011-07-25 22:27:42 +00:00
Eli Friedman cbd3ba91b7 Make sure this DAGCombine actually returns an UNDEF of the correct type; PR10476.
llvm-svn: 135993
2011-07-25 22:25:42 +00:00
Jakub Staszak 49993f26bf Add BlockFrequency class.
llvm-svn: 135992
2011-07-25 22:24:51 +00:00
Jim Grosbach 3a9cbeed73 ARM assembly parsing and encoding for SSAT instruction.
Fix the Rn register encoding for both SSAT and USAT. Update the parsing of the
shift operand to correctly handle the allowed shift types and immediate ranges
and issue meaningful diagnostics when an illegal value or shift type is
specified. Add aliases to parse an ommitted shift operand (default value of
'lsl #0').

Add tests for diagnostics and proper encoding.

llvm-svn: 135990
2011-07-25 22:20:28 +00:00
Andrew Trick 990f771a9a Add clarifying comments for the new arguments to UnrollLoop.
llvm-svn: 135988
2011-07-25 22:17:47 +00:00
Evan Cheng 55c8a78716 Refactoring fail.
llvm-svn: 135986
2011-07-25 22:16:37 +00:00
Evan Cheng 6099cf16e5 Move CBackend and CppBackend MC initialization to TargetInfo.
llvm-svn: 135982
2011-07-25 21:44:12 +00:00
Eli Friedman ea8c66fea5 Get rid of an incorrect optimization for shuffles with PALIGNR and simplify isPALIGNRMask.
Addresses PR10466, although the crash from that PR only triggers in cases where DAGCombine misses optimizing a shuffle.

llvm-svn: 135980
2011-07-25 21:36:45 +00:00
Evan Cheng 9eec764c15 Fix more MC layering violations.
llvm-svn: 135979
2011-07-25 21:32:49 +00:00
Evan Cheng 21b42e2498 More MC layering violations.
llvm-svn: 135978
2011-07-25 21:29:26 +00:00
Chandler Carruth e0e91c6d30 Check in updated CMake dependencies after Evan's latest round of
refactorings. Several places that shouldn't have dependend on Target no
longer do. Also almost all of the CodeGen dependencies have gone away
for the MCDisassembler. Others add reasonable dependencies within the
target-specific layers.

llvm-svn: 135977
2011-07-25 21:25:07 +00:00
Chandler Carruth b2561029b1 Add a missing enumerator to this switch. Currently its in the
assert-path code, as previously we would have fallen off the end of the
function, but please review and let me know if this should go somewhere
else.

This fixes a Clang warning:
lib/MC/MCMachOStreamer.cpp:201:11: error: enumeration value 'MCSA_IndirectSymbol' not handled in switch [-Werror,-Wswitch-enum]
  switch (Attribute) {
          ^
1 error generated.

llvm-svn: 135976
2011-07-25 21:21:08 +00:00
Rafael Espindola e96fd5a4fe Add LLVMAddTargetLibraryInfo to the C API.
llvm-svn: 135975
2011-07-25 21:20:54 +00:00
Evan Cheng 61faa55b74 Separate MCInstPrinter registration from AsmPrinter registration.
llvm-svn: 135974
2011-07-25 21:20:24 +00:00
Nick Lewycky 77cb8e681f Add missing space (this line is no longer pushing the 80-column limit).
llvm-svn: 135973
2011-07-25 21:16:04 +00:00
Nick Lewycky f6e3711674 80 columns.
llvm-svn: 135972
2011-07-25 21:13:23 +00:00
Nick Lewycky 85a19aa333 Fix typo.
llvm-svn: 135971
2011-07-25 21:12:44 +00:00
Jim Grosbach 3ddf6aa503 Simply ARM so_reg MIOperandInfo definitions.
The shift immediate encoding, printing, etc. is handled directly by the
enclosing operand definition, so it should be a vanilla immediate, not a
nested complex operand (shift_imm).

llvm-svn: 135968
2011-07-25 21:04:58 +00:00
Rafael Espindola 7281395c8c Add LLVMAddLowerExpectIntrinsicPass to the C API.
llvm-svn: 135966
2011-07-25 20:57:59 +00:00
Evan Cheng f60768a14e Fix last bits of MC layer issues. llvm-mc doesn't need to initialize TargetMachine's anymore.
llvm-svn: 135963
2011-07-25 20:53:02 +00:00
Jim Grosbach ac798e1533 ARM asm operand renaming. Make things a bit more explicit.
llvm-svn: 135959
2011-07-25 20:49:51 +00:00
Jim Grosbach eeaab22166 More simple cleanup of ARM asm operand definitions.
llvm-svn: 135958
2011-07-25 20:38:18 +00:00
Bill Wendling e2225058ac Fix some typos.
llvm-svn: 135956
2011-07-25 20:25:03 +00:00
Bill Wendling c708441e3f An initial description of the compact unwind encoding.
llvm-svn: 135955
2011-07-25 20:19:48 +00:00
Evan Cheng f5bf19530b Code clean up.
llvm-svn: 135954
2011-07-25 20:18:48 +00:00
Evan Cheng d2e165d48b Refactor MBlaze target to separate MC routines from Target routines.
llvm-svn: 135953
2011-07-25 20:18:18 +00:00
Oscar Fuentes 4f0f335066 While building a LLVM target, put the current source directory on the
header search path.

llvm-svn: 135952
2011-07-25 20:17:01 +00:00
Bill Wendling 43ab71a9a8 Update the comment. This feature is available only on Darwin at the moment. Though it's not Darwin-specific.
llvm-svn: 135951
2011-07-25 20:15:15 +00:00
Jim Grosbach 2d6ef44d39 Make assembly parser method names more consistent.
llvm-svn: 135950
2011-07-25 20:14:50 +00:00
Oscar Fuentes 47d4aaf8ad Unbreak the build.
llvm-svn: 135949
2011-07-25 20:13:36 +00:00