llvm-6502/lib
Michael Liao b118a073d7 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164281 91177308-0d34-0410-b5e6-96231b3b80d8
2012-09-20 03:06:15 +00:00
..
Analysis GCC doesn't understand that OrigAliasResult having a value is correlated with 2012-09-19 15:43:44 +00:00
Archive Mark checkSignature const, and in turn stop casting away const from 2012-09-05 22:09:23 +00:00
AsmParser Convert some attribute existence queries over to use the predicate methods. 2012-09-19 23:54:18 +00:00
Bitcode Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments. 2012-09-15 17:09:36 +00:00
CodeGen Convert some attribute existence queries over to use the predicate methods. 2012-09-19 23:54:18 +00:00
DebugInfo Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-18 02:01:41 +00:00
ExecutionEngine Mark unimplemented copy constructors and copy assignment operators as LLVM_DELETED_FUNCTION. 2012-09-18 02:01:41 +00:00
Linker Move the "findUsedStructTypes" functionality outside of the Module class. 2012-08-03 00:30:35 +00:00
MC Add support for macro parameters/arguments delimited by spaces, 2012-09-19 20:36:12 +00:00
Object Reverting r 160419. 2012-07-19 21:43:55 +00:00
Support This patch adds memory support functions which will later be used to implement section-specific protection handling in MCJIT. 2012-09-19 20:46:12 +00:00
TableGen De-nest if's and fix mix-up 2012-09-19 02:14:59 +00:00
Target Re-work X86 code generation of atomic ops with spin-loop 2012-09-20 03:06:15 +00:00
Transforms Renaming functions to match coding style guidelines 2012-09-19 18:14:45 +00:00
VMCore Convert some attribute existence queries over to use the predicate methods. 2012-09-19 23:54:18 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile