Commit Graph

85074 Commits

Author SHA1 Message Date
Michael Liao a880186030 Add missing i8 max/min/umax/umin support
- Fix PR5145 and turn on test 8-bit atomic ops

llvm-svn: 164358
2012-09-21 03:18:52 +00:00
Michael Liao c33bebff52 Revise td of X86 atomic instructions
- Rewirte most atomic instructions in templates for both better
  maintenance and future extensions, such as HLE in TSX.

llvm-svn: 164357
2012-09-21 03:00:17 +00:00
Sean Silva 835ef201ac docs: Fix Sphinx warning over Atomics.rst.
Atomics.rst was not linked into the toctree.

Docs now build warning-free!

llvm-svn: 164356
2012-09-21 02:46:32 +00:00
Sean Silva 9f0311deee docs: Fix Sphinx warning over yaml2obj.rst.
yaml2obj.rst was not included in the toctree

Input from Michael Spencer.

llvm-svn: 164355
2012-09-21 02:46:30 +00:00
NAKAMURA Takumi f51004bca5 Mips16FrameLowering.cpp: Remove unused TII introduced in r164349. [-Wunused-variable]
llvm-svn: 164354
2012-09-21 02:21:30 +00:00
NAKAMURA Takumi 1a38004c1b llvm/test/CodeGen/ARM/fast-isel.ll: Fix possible typos, s/@unaligned_i16_store/@unaligned_i16_load/g.
I guess this had apparently passed in +Asserts possibly due to verborsity.

llvm-svn: 164350
2012-09-21 01:15:05 +00:00
Akira Hatanaka cd04e2b8e2 Properly save and restore RA and Mips16 callee save registers S0,S1
Patch by Reed Kotler.

llvm-svn: 164349
2012-09-21 01:08:16 +00:00
Chad Rosier 8ff5a4aa79 Testcase does not need to be this strict.
llvm-svn: 164347
2012-09-21 00:47:08 +00:00
Chad Rosier 1fb301aa41 Add newline.
llvm-svn: 164346
2012-09-21 00:43:18 +00:00
Chad Rosier 2364f58326 [fast-isel] Fallback to SelectionDAG isel if we require strict alignment for
non-halfword-aligned i16 loads/stores.
rdar://12304911

llvm-svn: 164345
2012-09-21 00:41:42 +00:00
Jim Grosbach e2baa97d60 Tidy up. Whitespace.
llvm-svn: 164344
2012-09-21 00:36:42 +00:00
Jim Grosbach 9659ed9813 Tidy up. Formatting.
llvm-svn: 164343
2012-09-21 00:26:53 +00:00
Jim Grosbach 74b61c398c ARM: Use a dedicated intrinsic for vector bitwise select.
The expression based expansion too often results in IR level optimizations
splitting the intermediate values into separate basic blocks, preventing
the formation of the VBSL instruction as the code author intended. In
particular, LICM would often hoist part of the computation out of a loop.

rdar://11011471

llvm-svn: 164340
2012-09-21 00:18:20 +00:00
Jakob Stoklund Olesen b8707faba3 Ignore PHI-defs for -new-coalescer interference checks.
A PHI can't create interference on its own. If two live ranges interfere
at a PHI, they must also interfere when leaving one of the PHI
predecessors.

llvm-svn: 164330
2012-09-20 23:08:42 +00:00
Jakob Stoklund Olesen 09cd303655 Extend -new-coalescer SSA update to handle mapped values as well.
The old-fashioned many-to-one value mapping doesn't always work when
merging vector lanes. A value can map to multiple different values, and
it can even be necessary to insert new PHIs.

When a value number is defined by a copy from a value number that
required SSa update, include the live range of the copied value number
in the SSA update as well. It is not necessarily a copy of the original
value number any longer.

llvm-svn: 164329
2012-09-20 23:08:39 +00:00
Eric Christopher 3a3d529e0d Only emit DW_AT_object_pointer if this is a definition.
llvm-svn: 164326
2012-09-20 22:51:57 +00:00
Manman Ren 93ab64916f SimplifyCFG: sink common codes from IF, ELSE blocks down to END block.
We already have HoistThenElseCodeToIf, this patch implements
SinkThenElseCodeToEnd. When END block has only two predecessors and each
predecessor terminates with unconditional branches, we compare instructions in
IF and ELSE blocks backwards and check whether we can sink the common
instructions down.

rdar://12191395

llvm-svn: 164325
2012-09-20 22:37:36 +00:00
Evan Cheng 363d73c518 Try to make these tests more portable.
llvm-svn: 164320
2012-09-20 21:35:21 +00:00
Benjamin Kramer 8554206652 Fix broken check lines.
llvm-svn: 164317
2012-09-20 19:54:13 +00:00
Andrew Trick e6af4b9a35 Fix function names in coding style examples
llvm-svn: 164311
2012-09-20 17:02:04 +00:00
Bill Wendling c727bacb38 Revert r164308 to fix buildbots.
llvm-svn: 164309
2012-09-20 16:59:57 +00:00
Bill Wendling abac66150c Make the 'get*AlignmentFromAttr' functions into member functions within the Attributes class.
llvm-svn: 164308
2012-09-20 16:27:05 +00:00
Bill Wendling b4e211cd19 Remove more bare uses of the different Attribute enums.
llvm-svn: 164307
2012-09-20 15:20:36 +00:00
Roman Divacky 264f504077 Specify cpu to get the correct instruction ordering. Remove XFAIL.
llvm-svn: 164306
2012-09-20 14:59:42 +00:00
Bill Wendling de74cf50da Make the 'getAsString' function a method of the Attributes class.
llvm-svn: 164305
2012-09-20 14:44:42 +00:00
Nadav Rotem 841c9a84d0 Fix 80-col violations.
llvm-svn: 164297
2012-09-20 08:53:31 +00:00
Tim Northover 572d0698d2 Make sure lli compiles all code before invalidating instruction caches.
Patch from Amara Emerson.

llvm-svn: 164296
2012-09-20 08:46:30 +00:00
Craig Topper 980739afdf Change enum type in a static table to uint8_t instead. Saves about 700 hundred bytes of static data. Change unsigned char in same table to uint8_t for explicitness.
llvm-svn: 164285
2012-09-20 06:14:08 +00:00
Michael Liao 83bc2119dc Specify CPu to prevent failure on ATOM due to different code scheduling
llvm-svn: 164283
2012-09-20 03:34:04 +00:00
Sean Silva 98f84c998f Fix Sphinx warnings.
Toctree was not being interlinked properly.

llvm-svn: 164282
2012-09-20 03:20:53 +00:00
Michael Liao 3237662b65 Re-work X86 code generation of atomic ops with spin-loop
- Rewrite/merge pseudo-atomic instruction emitters to address the
  following issue:
  * Reduce one unnecessary load in spin-loop

    previously the spin-loop looks like

        thisMBB:
        newMBB:
          ld  t1 = [bitinstr.addr]
          op  t2 = t1, [bitinstr.val]
          not t3 = t2  (if Invert)
          mov EAX = t1
          lcs dest = [bitinstr.addr], t3  [EAX is implicit]
          bz  newMBB
          fallthrough -->nextMBB

    the 'ld' at the beginning of newMBB should be lift out of the loop
    as lcs (or CMPXCHG on x86) will load the current memory value into
    EAX. This loop is refined as:

        thisMBB:
          EAX = LOAD [MI.addr]
        mainMBB:
          t1 = OP [MI.val], EAX
          LCMPXCHG [MI.addr], t1, [EAX is implicitly used & defined]
          JNE mainMBB
        sinkMBB:

  * Remove immopc as, so far, all pseudo-atomic instructions has
    all-register form only, there is no immedidate operand.

  * Remove unnecessary attributes/modifiers in pseudo-atomic instruction
    td

  * Fix issues in PR13458

- Add comprehensive tests on atomic ops on various data types.
  NOTE: Some of them are turned off due to missing functionality.

- Revise tests due to the new spin-loop generated.

llvm-svn: 164281
2012-09-20 03:06:15 +00:00
Sean Silva 51fc86ddfe Sphinxify DebuggingJITedCode
LGTM by Michael Spencer

llvm-svn: 164280
2012-09-20 03:05:26 +00:00
Andrew Trick fc9420c006 Fix static function names in CodingStandards examples.
Try not to violate conventions immediately before explaining them.

llvm-svn: 164278
2012-09-20 02:01:06 +00:00
Bill Wendling 3bef2dd5f9 Convert some attribute existence queries over to use the predicate methods.
llvm-svn: 164268
2012-09-19 23:54:18 +00:00
Jim Grosbach 38bfa0c529 ARM: Tidy up IntrinsicsARM.td a bit.
Make the TargetPrefix setting one big setting instead of being spread out
everywhere. No functional change.

llvm-svn: 164265
2012-09-19 23:39:03 +00:00
Bill Wendling d6b2688130 Add predicates for queries on whether an attribute exists.
llvm-svn: 164264
2012-09-19 23:35:21 +00:00
Micah Villmow 75e29c4b78 Add in new data types that are used by AMDIL/ANL among others.
llvm-svn: 164261
2012-09-19 22:47:07 +00:00
Owen Anderson dee6583dfd Soften the pattern-can-never-match error in TableGen into a warning. This pattern can be very useful in cases where you want to define a multiclass that covers both commutative and non-commutative operators (say, add and sub).
llvm-svn: 164256
2012-09-19 22:15:06 +00:00
Owen Anderson 1fc793e926 Implement a correct copy constructor for Record. Now that we're using the ID number as a key in maps (for determinism), it is imperative that ID numbers be globally unique, even when we copy construct a Record.
This fixes some obscure failure cases involving registers defined inside multiclasses or foreach constructs that would not receive a unique ID, and would end up being omitted from the AsmMatcher tables.

llvm-svn: 164251
2012-09-19 21:34:18 +00:00
Jakob Stoklund Olesen 7d3c9c0a2a Resolve conflicts involving dead vector lanes for -new-coalescer.
A common coalescing conflict in vector code is lane insertion:

  %dst = FOO
  %src = BAR
  %dst:ssub0 = COPY %src

The live range of %src interferes with the ssub0 lane of %dst, but that
lane is never read after %src would have clobbered it. That makes it
safe to merge the live ranges and eliminate the COPY:

  %dst = FOO
  %dst:ssub0 = BAR

This patch teaches the new coalescer to resolve conflicts where dead
vector lanes would be clobbered, at least as long as the clobbered
vector lanes don't escape the basic block.

llvm-svn: 164250
2012-09-19 21:29:18 +00:00
Andrew Kaylor 1f66100755 This patch adds memory support functions which will later be used to implement section-specific protection handling in MCJIT.
llvm-svn: 164249
2012-09-19 20:46:12 +00:00
Preston Gurd 055006475e Add support for macro parameters/arguments delimited by spaces,
to improve compatibility with GNU as.

Based on a patch by PaX Team.

Fixed assertion failures on non-Darwin and added additional test cases.

llvm-svn: 164248
2012-09-19 20:36:12 +00:00
Duncan Sands 12ccbe7a8e Add support for accessing an MDNode's operands via the C binding. Patch by
Anthony Bryant.

llvm-svn: 164247
2012-09-19 20:29:39 +00:00
Preston Gurd 242ed3158a Support default parameters/arguments for assembler macros.
This patch is based on the one by PaX Team.

Patch by Andy Zhang!

llvm-svn: 164246
2012-09-19 20:29:04 +00:00
Preston Gurd eb3ebf16ab Enhance unmatched '.endr' directive error message in assembler.
The directive can be matched with directives other than '.rept'

Patch by Andy Zhang!

llvm-svn: 164245
2012-09-19 20:23:43 +00:00
Michael Liao 8372539543 Unify the logic in SelectAtomicLoadAdd and SelectAtomicLoadArith
- Merge the processing of LOAD_ADD with other atomic load-arith
  operations
- Separate the logic getting target constant for atomic-load-op and add
  an optimization for atomic-load-add on i16 with negative value
- Optimize a minor case for atomic-fetch-add i16 with negative operand. Test
  case is revised.

llvm-svn: 164243
2012-09-19 19:36:58 +00:00
Michael Ilseman 5117db54ff Renaming functions to match coding style guidelines
llvm-svn: 164238
2012-09-19 18:14:45 +00:00
Jordan Rose b64c123453 Really XFAIL test/CodeGen/PowerPC/structsinregs.ll.
XFAIL needs a trailing colon. Hopefully this will get the buildbots
happy again while Bill works on getting it passing.

llvm-svn: 164237
2012-09-19 17:03:11 +00:00
Michael Ilseman 370a1a1c94 Doxygen-ify comments
llvm-svn: 164235
2012-09-19 16:25:57 +00:00
Bill Schmidt 479a4588b9 XFAIL test/CodeGen/PowerPC/structsinregs.ll
llvm-svn: 164233
2012-09-19 16:18:23 +00:00