clamav/libclamav/c++/llvm/docs/LangRef.html
Török Edvin 6c5344d3ea Merge LLVM upstream r83242.
Squashed commit of the following:

commit 6f2bf0bd6f1ff49887d30f3433d05bd906e6b3d3
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Oct 2 06:57:25 2009 +0000

    getFunctionAlignment should return log2 alignment.

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

commit 69e343b1b893bf2b11cc0320973d329eb9102e79
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Oct 2 06:53:57 2009 +0000

    Fix tests.

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

commit 42b0e2ad0096357ac3f62e5e7066703bdb93ba75
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Oct 2 06:50:50 2009 +0000

    Fix test.

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

commit 62213e4da7f2ac9b615a3bd53baad974c1c36bdd
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Oct 2 06:07:47 2009 +0000

    C++ member functions must be 2 byte aligned per ABI.

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

commit 4a6e6dd500a86c44803aa7b1414c8603d9e5c753
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Oct 2 05:03:07 2009 +0000

    Forgot about ARM::tPUSH. It also has a new writeback operand.

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

commit a2e9ca91163c46e55d5ee9e16efb3a1ab6a01467
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Oct 2 04:57:15 2009 +0000

    Move load / store multiple before post-alloc scheduling.

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

commit 926c44a79e4e6eb86e44028d9f313640c6238ddf
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Oct 2 04:45:37 2009 +0000

    Test case for aligned attribute on function declaration.

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

commit db397e1ea09a961e2b3f16d7ee85eae5f19f8771
Author: David Goodwin <david_goodwin@apple.com>
Date:   Thu Oct 1 23:28:47 2009 +0000

    All callee-saved registers are live-out of a return block.

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

commit 736fed9ff71ae677a7c947ac80ebb42a527de0dc
Author: David Goodwin <david_goodwin@apple.com>
Date:   Thu Oct 1 22:19:57 2009 +0000

    Remove neonfp attribute and instead set default based on CPU string. Add -arm-use-neon-fp to override the default.

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

commit 5d14abe36967fe67c85915dc6102a3b24fc1cd4a
Author: Mike Stump <mrs@apple.com>
Date:   Thu Oct 1 22:08:58 2009 +0000

    Expand api out in the usual inserter way, though, I do have a
    question, can we get rid of the BasicBlock versions of all inserters
    and use Head == 0 to indicate the old case when GetInsertBlock == 0?

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

commit 089aa85274d26ebec4989ac1ceeefba7fca5e5ea
Author: David Goodwin <david_goodwin@apple.com>
Date:   Thu Oct 1 21:46:35 2009 +0000

    Restore the -post-RA-scheduler flag as an override for the target specification. Remove -mattr for setting PostRAScheduler enable and instead use CPU string.

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

commit a9a6b6528197d68ea551f665bc6be722a0009630
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Oct 1 20:54:53 2009 +0000

    ARM::tPOP and tPOP_RET each has an extra writeback operand now.

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

commit 254350268fc9c24618049ec56bb13484a12bd7ea
Author: Jim Grosbach <grosbach@apple.com>
Date:   Thu Oct 1 20:45:06 2009 +0000

    remove trailing whitespace

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

commit 6a26010c218cd8979439036cc90d3bea93b3996b
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Oct 1 20:31:14 2009 +0000

    Add support to extract lexical scope information from DebugLoc attached with an machine instruction.
    This is not yet enabled.

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

commit cdb56fcef112775875904583d3cc07a262a28af3
Author: David Goodwin <david_goodwin@apple.com>
Date:   Thu Oct 1 19:45:32 2009 +0000

    Use MachineFrameInfo.getPristineRegs() to determine which callee-saved registers are available for anti-dependency breaking. Some cleanup.

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

commit 90ecd198e2f605f8a613ce0861aeea7e16a56575
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Oct 1 18:25:23 2009 +0000

     Record first and last instruction of a scope in DbgScope.

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

commit 23e904656c452ab739af152a9f767a5e504be4f5
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Oct 1 17:39:52 2009 +0000

    Don't use identifiers that start with an underscore followed
    by a capital letter, which invokes undefined behavior.

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

commit 0f9678ef172077982826809d5111881929175d83
Author: Douglas Gregor <doug.gregor@gmail.com>
Date:   Thu Oct 1 17:25:36 2009 +0000

    Teach CMake to look for bidirectional_iterator, iterator, forward_iterator, uint64_t, and u_int64_t, from Yonggang Luo

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

commit 04be082a4a304483410133a89dbd0f1dfe902c9a
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Oct 1 08:26:23 2009 +0000

    Observe hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. Do not change
    operands of instructions with these properties while breaking anti-dep.

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

commit 7c8d5ea09fb5e7a585533f711b9540e9b3b95a5e
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Oct 1 08:22:27 2009 +0000

    Add hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq flags to ld / st multiple,
    ld / st pairs, etc.

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

commit f6ea3038ef1d98019eb620ad0fbb8f2ca5f49da5
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Oct 1 08:21:18 2009 +0000

    Add instruction flags: hasExtraSrcRegAllocReq and hasExtraDefRegAllocReq. When
    set, these flags indicate the instructions source / def operands have special
    register allocation requirement that are not captured in their register classes.
    Post-allocation passes (e.g. post-alloc scheduler) should not change their
    allocations. e.g. ARM::LDRD require the two definitions to be allocated
    even / odd register pair.

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

commit 8ae1c40d8152145e9810bc28383af1d3ebf5b52b
Author: Douglas Gregor <doug.gregor@gmail.com>
Date:   Thu Oct 1 05:30:05 2009 +0000

    Remove GVNPRE.cpp from the CMake makefile

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

commit 50ee6c55ed015693e91bcebda0c100f6185a47fe
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Oct 1 02:18:36 2009 +0000

    remove the GVNPRE pass.  It has been subsumed by the GVN pass.
    Ok'd by Owen.

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

commit 713ff84d1467c64ad625681baa355b49bcc44ca3
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Oct 1 01:39:21 2009 +0000

    Update ARM JIT emitter to account for ld/st multiple changes.

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

commit b43a20e3bce6b4b16151ec25ef3541494fce8425
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Oct 1 01:33:39 2009 +0000

    Change ld/st multiples to explicitly model the writeback to base register. This fixes most of the -ldstopti-before-sched2 regressions.

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

commit f736728788cddfb56d44fb826cb5d91dfdbfe294
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Oct 1 01:15:28 2009 +0000

    Add another MDNode into DebugLocTuple. This will be used to keep track of inlined functions.

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

commit 539f434334ae6cc5becba8b3099eb20ab7fe48dc
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Oct 1 01:03:26 2009 +0000

    If location info is attached with an instruction then keep track of alloca slots used by a variable. This info will be used by AsmPrinter to emit debug info for variables.

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

commit 86049dcedaba49929bf6e4c1cd84f9d85cadb987
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 30 23:12:50 2009 +0000

    Use MachineInstr as an processDebugLoc() argument.
    This will allow processDebugLoc() to handle scopes for DWARF debug info.

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

commit 4d23d84af58fc21b50dce528a8a26a30a62db355
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 30 22:51:28 2009 +0000

    Use MDNode * directly as an RecordSourceLine() argument.

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

commit 16030402039c222229fe0e64cbc8307964480e31
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 30 22:43:52 2009 +0000

    Remove dead code.

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

commit 3733e0ac886bb85bd0735fdee4421683d9be3682
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 30 22:34:41 2009 +0000

    Add isFOO() helpers. Fix getDirectory() and getFilename() for DIScope.

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

commit 1f9b67a27f82ba4d75625c2e260d40cb3b662393
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 30 22:25:37 2009 +0000

    Use OutStreamer.SwitchSection instead of writing out textual section directives.
    Add a new TargetLoweringObjectFileMachO::getConstTextCoalSection method to
    get access to that section.

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

commit b5f835ee6e48aedbffb804a6bf5308465867e67b
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 30 22:06:26 2009 +0000

    Add a new virtual EmitStartOfAsmFile method to the AsmPrinter and use this
    to emit target-specific things at the beginning of the asm output.  This
    fixes a problem for PPC, where the text sections are not being kept together
    as expected.  The base class doInitialization code calls DW->BeginModule()
    which emits a bunch of DWARF section directives.  The PPC doInitialization
    code then emits all the TEXT section directives, with the intention that they
    will be kept together. But as I understand it, the Darwin assembler treats
    the default TEXT section as a special case and moves it to the beginning of
    the file, which means that all those DWARF sections are in the middle of
    the text.  With this change, the EmitStartOfAsmFile hook is called before
    the DWARF section directives are emitted, so that all the PPC text section
    directives come out right at the beginning of the file.

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

commit 4901f432e56cb1b6823a9b3170a08ff56f1f2c37
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 30 21:44:42 2009 +0000

    Fix a comment typo.

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

commit 5c6b6fc5b3777a3001043ba3a5db54ac41f97a1b
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 30 21:26:51 2009 +0000

    Check for null MDNode element while printing comment.

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

commit 6ed4b620633aff7001447bf3ddd86924f8fd7d10
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 30 21:26:13 2009 +0000

    Fix a comment.

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

commit cd8cb7f1e4075f66179e15deb0c0aecaf09fe4be
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 30 21:24:45 2009 +0000

    The AsmPrinter base class contains a DwarfWriter member, so there's no need
    for derived AsmPrinters to add another one.  In some cases, fixing this
    removes the need to override the doInitialization method.

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

commit cd36d91b6775ae45eb46eb2a0f4ac47b4a8cb9d8
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Wed Sep 30 21:08:08 2009 +0000

    Assert that ConstantArrays are created with correctly-typed elements.

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

commit a6c9ec0753ed03948b49ae3e0d96b87b484ee247
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 30 20:54:16 2009 +0000

    Fix this code so that it doesn't try to iterate through a std::vector
    while calling changeImmediateDominator, which removes elements from the
    vector. This fixes PR5097.

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

commit 64ccb3919aa594caf4c2196eed9e72cc9797fe57
Author: Reid Kleckner <reid@kleckner.net>
Date:   Wed Sep 30 20:43:07 2009 +0000

    Silence comparison always false warning in -Asserts mode.

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

commit af24317c91a2383560a6707d35ae41f770c05a14
Author: Jim Grosbach <grosbach@apple.com>
Date:   Wed Sep 30 20:35:36 2009 +0000

    Add additional assert() to verify no extraneous use of a scavenged register.

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

commit 60a7ae26df4ce7d2dac4636e924c29eed0f97df4
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 30 20:16:54 2009 +0000

    Print tag name for MDNodes that are used to encode debug info.

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

commit e9b95fd1ebb1f046d17afd0123d7c3afcd4ddef0
Author: Reid Kleckner <reid@kleckner.net>
Date:   Wed Sep 30 20:15:38 2009 +0000

    Fix integer overflow in instruction scheduling.  This can happen if we have
    basic blocks that are so long that their size overflows a short.

    Also assert that overflow does not happen in the future, as requested by Evan.

    This fixes PR4401.

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

commit 5a8c00d3394922bbc310fdd6ffb829939de37cd1
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 30 17:13:41 2009 +0000

    Silence unused variable warning.

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

commit 65a2b9aff1084c5c54afd4577555a5bf3b124114
Author: Jim Grosbach <grosbach@apple.com>
Date:   Wed Sep 30 15:23:38 2009 +0000

    Clarify comment phrasing.

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

commit 140523508f5e2af96e8c01218b4c4fc1c73abcdb
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 30 08:53:01 2009 +0000

    Add a option which would move ld/st multiple pass before post-alloc scheduling.

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

commit caa654136388c6b3b1909149a5d9002159983ee1
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 30 08:49:50 2009 +0000

    Add a target hook to add pre- post-regalloc scheduling passes.

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

commit 28568c1e49f9781afd921e2fbb52b18fb2ec6321
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 30 08:41:27 2009 +0000

    Forgot this test earlier.

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

commit 2375debd3ff878723a90be0f69860eae30ace312
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 30 06:27:22 2009 +0000

    add macruby, fix a validation problem.

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

commit 133cf876fff85ed26381f2964e5c1de43764a051
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Wed Sep 30 04:50:26 2009 +0000

    Fix compile error as debug interface changed.

    By the way, this code is buggy. You can't keep a map<MDNode *, something>
    because the MDNode may be destroyed and reused for something else.

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

commit a0e180ac4672e4a304f93a2d0207428c83de155e
Author: Jim Grosbach <grosbach@apple.com>
Date:   Wed Sep 30 01:47:59 2009 +0000

    replace TRI->isVirtualRegister() with TargetRegisterInfo::isVirtualRegister()
    per customary usage

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

commit ce096d7654254793f6df9dcfea8e44345afa42bf
Author: Jim Grosbach <grosbach@apple.com>
Date:   Wed Sep 30 01:43:29 2009 +0000

    When checking whether we need to reserve a register for the scavenger,
    the size of the saved frame pointer needs to be taken into account.

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

commit c6f0c0268cdad78cdc3b8d4b4ad597d1c3ce7ba2
Author: Jim Grosbach <grosbach@apple.com>
Date:   Wed Sep 30 01:35:11 2009 +0000

    Add "isBarrier = 1" to return instructions.

    Patch by Sylvere Teissier.

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

commit 25e34f9b00ed6c3b69f77fbec6173ca9071ac793
Author: Jim Grosbach <grosbach@apple.com>
Date:   Wed Sep 30 00:37:40 2009 +0000

    fix compiler warning

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

commit fcadb50767616efc30787f5e5bcbf67b3fc3d7f0
Author: David Goodwin <david_goodwin@apple.com>
Date:   Wed Sep 30 00:23:57 2009 +0000

    Remove regression that requires post-RA scheduling from a target that does not use that scheduler.

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

commit 5147f1174ae1b6f8af2bc03d8f9915bda2937961
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 30 00:23:42 2009 +0000

    For Darwin, emit all the text section directives together before the dwarf
    section directives.  This causes the assembler to put the text sections at
    the beginning of the object file, which helps work around a limitation of the
    Darwin ARM relocations.  Radar 7255355.

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

commit 48e8d7af49d3f3e2cd279c13b8897fcade1801a5
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 30 00:14:40 2009 +0000

    Simplify.

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

commit cf89a609bc2c368e2c5c970131edc40c08175893
Author: David Goodwin <david_goodwin@apple.com>
Date:   Wed Sep 30 00:10:16 2009 +0000

    Remove -post-RA-schedule flag and add a TargetSubtarget method to enable post-register-allocation scheduling. By default it is off. For ARM, enable/disable with -mattr=+/-postrasched. Enable by default for cortex-a8.

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

commit 3abdd85bbfd3f3f16e7c4551ba86fed9c412ea82
Author: Douglas Gregor <doug.gregor@gmail.com>
Date:   Wed Sep 30 00:08:25 2009 +0000

    Forward-declare ValueSymbolTable so that SymbolTableListTraits.h can be parsed by itself

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

commit b22cd0ff4c6c3ba4a39b8b11afb21ddf40e79f74
Author: Mike Stump <mrs@apple.com>
Date:   Wed Sep 30 00:08:22 2009 +0000

    Add a way for a frontend to generate more complex dwarf location
    information.  This allows arbitrary code involving DW_OP_plus_uconst
    and DW_OP_deref.  The scheme allows for easy extention to include,
    any, or all of the DW_OP_ opcodes.  I thought about just exposing all
    of them, but, wasn't sure if people wanted the dwarf opcodes exposed
    in the api.  Is that a layering violation?

    With this scheme, the entire existing block scheme used by llvm-gcc
    can be switched over to the new scheme.  I think that would be
    cleaner, as then the compiler specific bits are not present in llvm
    proper.  Before the old code can be yanked however, similar code in
    clang would have to be removed.

    Next up, more testing.

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

commit 278c839fdb36f39a25935fd83e12144b374d4e75
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 29 23:17:20 2009 +0000

    minor cleanup and add clarifying comment

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

commit 5c888f47d45c8b462e23cc270731bff109e55e0f
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 29 22:05:52 2009 +0000

    Lookup handler name only when assertions are enabled.

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

commit 91291d92510d559e84bb36184703684dcd330469
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 29 20:42:25 2009 +0000

    Add removeMD().

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

commit 3402a11ab9fadebbfd897d532e3dd3ec33bc76d5
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 29 20:30:57 2009 +0000

    Only one custom meadata of each kind can be attached with an instruction.

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

commit 1f2144540eebd8dfd6161f7f1e350f7f0cf8fc89
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 29 20:11:10 2009 +0000

    Additional check for regno==0

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

commit 789d5d396510406c9dfbf26b8b5e5ee463f0eb60
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 29 20:01:19 2009 +0000

    Use assertion instead of early exit to catch malformed custom metadata store.

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

commit 50ffdfb9df7dceaba43fd40a1053d22787257fd6
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 29 19:56:13 2009 +0000

    Remove unnecessary cast.

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

commit aaf012ebb492482ba3626e4129140713cd7836b7
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 29 18:40:58 2009 +0000

    Remove std::string uses from DebugInfo interface.

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

commit e4002bc8194a36ff425f37829d6fb04a56ef1358
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 29 18:39:56 2009 +0000

    Create empty StringRef is incoming cstring is NULL.

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

commit 428fa81b068032e70a4df96a9bf95aea8647bae7
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 29 18:23:15 2009 +0000

    Simplify the tracking of virtual frame index registers. Ranges cannot overlap,
    so a simple "current register" will suffice. Also add some additional
    sanity-checking assertions to make sure things are as we expect.

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

commit 1261bc74142b823bf80824e5f7e20697cb136747
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 29 17:24:37 2009 +0000

    Moving register scavenging to a post pass results in virtual registers in
    the instruction we're scavenging for. The scavenger needs to know to avoid
    them when analyzing register usage.

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

commit d87b736e032e2bb48df5de77b2632197cd89d73f
Author: David Goodwin <david_goodwin@apple.com>
Date:   Tue Sep 29 17:10:26 2009 +0000

    Post-RA regressions.

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

commit 350c913b054b04ffd2c0041e8cf63d6031cb060b
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 29 07:07:30 2009 +0000

    Fix PR4687. Pre ARMv5te does not support ldrd / strd. Patch by John Tytgat.

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

commit 5c2dc21a880cfd629c485bf65dcc7d8380da234d
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 29 06:18:23 2009 +0000

    Regenerate.

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

commit d5f12fed540b9487fe8a48e7480344ab0c33676d
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 29 06:18:00 2009 +0000

    Fix configure bug that only shows up in a clean build. Don't try to invoke gcc
    until after the compiler itself has been set up.

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

commit d2813d0d6d353fb32749e66adc03e5a388c6eee2
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 29 05:48:51 2009 +0000

    Roll back r83048.

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

commit e4ba4c6918a704922ebaf2dada823423d503fe7a
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 29 05:41:21 2009 +0000

    Regenerate.

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

commit 6c6df93ec728e0c4109690a0712100f2381002ce
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 29 05:40:45 2009 +0000

    On Linux, uname -m reports the kernel type. Some Linux systems are 32-bit but
    with a 64-bit kernel, which confuses LLVM. Make LLVM double-check this by
    checking which defines the system gcc actually sets.

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

commit 17c60df1f139b966e696c18683d6fac7afb0d4ac
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 29 00:01:14 2009 +0000

    Parse custom metadata attached with an instruction.

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

commit 8a60e6ab5c0bdebeeb93bf7837306b526c6174cd
Author: Stuart Hastings <stuart@apple.com>
Date:   Mon Sep 28 23:42:38 2009 +0000

    B&I's buildit forces a PATH that omits /Developer.  Temporarily add
    /Developer/usr/bin to the PATH when looking for llvm-gcc.

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

commit fe70981db2dc986f570f7aeefc6035477e704653
Author: Stuart Hastings <stuart@apple.com>
Date:   Mon Sep 28 22:17:53 2009 +0000

    For B&I-style builds, tweak build_llvm script to prefer LLVM-G++ if
    available.  Override by setting CC and CXX in the environment.

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

commit e68f04e420b7b2422586e4927db982f30c654e2f
Author: Jim Grosbach <grosbach@apple.com>
Date:   Mon Sep 28 22:08:06 2009 +0000

    Adjust processFunctionBeforeCalleeSavedScan() to correctly reserve a stack
    slot for the register scavenger when compiling Thumb1 functions.

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

commit 79af72b8cc78f43bda065f66a27992f14f44839b
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 21:51:41 2009 +0000

    Add C API calls for building FNeg operations. Patch by KS Sreeram!

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

commit 6de78e26bd0bb682ac466ae1b46a8a29c9d6ae9c
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Sep 28 21:41:20 2009 +0000

    s/class Metadata/class MetadataContext/g

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

commit b5896160216cae66e3a06cb58c3c38ba09f6969e
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Sep 28 21:14:55 2009 +0000

    Do not use global typedef for MDKindID.

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

commit cb8bbe7d7b17bf387769d86e614034a36adc159e
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Mon Sep 28 21:14:38 2009 +0000

    Forgot to update the documentation in r82906. s/DEBUG_RUNTIME/DEBUG_SYMBOLS/.

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

commit bb2172f0d0c6dff8c8df6099930aa8c6d97c4a46
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Sep 28 21:06:38 2009 +0000

    Remove unnecessary include.

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

commit 6218ff80a55e355aed58ecd5626a28bcba5f2309
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 21:03:02 2009 +0000

    Add a testcase for r83011.

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

commit 5de2a439373415252635c44a5441c699c6a9a982
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 21:01:47 2009 +0000

    When extending the operands of an addrec, iterate through all
    the operands, rather than trying to partition them into a start
    and a step. This handles non-affine add recurrences correctly.

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

commit a1b5c1ac519a42ccf25664de3acee4b97f5c87a0
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Sep 28 20:56:00 2009 +0000

    Do not hardcode metadata names.

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

commit 83cefbc8b9b22deae1a74c27b6c3576928ec5e83
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 20:48:39 2009 +0000

    Add a CHECK line to check the position of the second divsd.

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

commit 56a506296805c4967326a41bd5b0ae3202ace90f
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Mon Sep 28 20:47:15 2009 +0000

    Fix Thumb2 IT block pass bug. t2MOVi32imm may not be the start of a IT block.

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

commit 1b17870ccf5ae6abd45044f2788825fa0db381e5
Author: Jakob Stoklund Olesen <stoklund@2pi.dk>
Date:   Mon Sep 28 20:32:46 2009 +0000

    Use KILL instead of IMPLICIT_DEF in LowerSubregs pass.

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

commit 8f12c7cd04af1b2eadddf46f00bf9527fa484188
Author: Jakob Stoklund Olesen <stoklund@2pi.dk>
Date:   Mon Sep 28 20:32:26 2009 +0000

    Introduce the TargetInstrInfo::KILL machine instruction and get rid of the
    unused DECLARE instruction.

    KILL is not yet used anywhere, it will replace TargetInstrInfo::IMPLICIT_DEF
    in the places where IMPLICIT_DEF is just used to alter liveness of physical
    registers.

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

commit 0404c87e5e2d880e347a1e97e97e775534031692
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 18:40:27 2009 +0000

    Add a testcase to help test analysis preservation.

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

commit 24e32c155493661e8a9a5dbda73cda80d97e5203
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 18:38:53 2009 +0000

    Create a README.txt for lib/Analysis, and add an entry.

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

commit d8fdfc78fa6e85af471e6be708819ba7df013613
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Sep 28 18:31:56 2009 +0000

    Remove dead code.

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

commit c7d0e9d24270f52cdc47b94ebaad316d4fcc2b44
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 16:09:41 2009 +0000

    Use VerifySchedule instead of doing the work manually.

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

commit 52646b13f315ad45d6999871491c804a5ba706df
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 15:40:01 2009 +0000

    Fix this debug output to handle the case where the loop has been deleted.

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

commit 05e9fccefe7b54166c82415d0d2ab497a22eecb4
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 15:07:18 2009 +0000

    Include the name of the loop header in debug messages.

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

commit 2dac97890a66877e9f433d75b0f31f07df2ef84a
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 14:38:19 2009 +0000

    Remove a redundant #ifndef and add an assertion string.

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

commit b65091d85c1c7a467ecf0622747900e54012b2fb
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 14:37:51 2009 +0000

    Convert LoopSimplify and LoopExtractor from FunctionPass to LoopPass.

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

commit f4ecc68efa92c06e2de1937f2a6408f57318ee3f
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Mon Sep 28 14:30:20 2009 +0000

    Pass the optimization level when constructing the ARM instruction selector.
    Otherwise, it is always set to "default", which prevents debug info from
    even being generated during isel.  Radar 7250345.

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

commit 16c012d9a28fe4db3ee081192a587ad7f30d4cc2
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Mon Sep 28 09:14:39 2009 +0000

    Make ARM and Thumb2 32-bit immediate materialization into a single 32-bit pseudo
    instruction. This makes it re-materializable.

    Thumb2 will split it back out into two instructions so IT pass will generate the
    right mask. Also, this expose opportunies to optimize the movw to a 16-bit move.

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

commit 4468959a4eab134d4ca50b755aac6452617e8857
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 28 07:32:45 2009 +0000

    Don't traverse into .svn directories.

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

commit fe89b6a96501aabf8edbd991e9fb81108ecde782
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Mon Sep 28 07:26:46 2009 +0000

    Fix thinko in my recent movt commit: it's not safe to remat movt, since it has input reg argument.
    Disable rematting of it for now.

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

commit da3ee9ce1a46cf351e614a6c17627b63cec9b2b4
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 28 06:49:44 2009 +0000

    The select instruction is not neccesarily in the same block as the
    phi nodes.  Make sure to phi translate from the right block.

    This fixes a llvm-building-llvm failure on GVN-PRE.cpp

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

commit 58cb38c09d1b7e0e8c27d56ac94a524552ef436c
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Mon Sep 28 05:28:43 2009 +0000

    Coalescer should not delete extract_subreg, insert_subreg, and subreg_to_reg of
    physical registers. This is especially critical for the later two since they
    start the live interval of a super-register. e.g.
    %DO<def> = INSERT_SUBREG %D0<undef>, %S0<kill>, 1
    If this instruction is eliminated, the register scavenger will not be happy as
    D0 is not defined previously.
    This fixes PR5055.

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

commit b4cf975e89642255701b2f279b1647caf430947c
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Mon Sep 28 04:42:55 2009 +0000

    Document a bug in the ocaml bindings has wrong linkage values.

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

commit 61c452d71b139822208536338069d2bc7d464256
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Mon Sep 28 04:42:47 2009 +0000

    Expose the rest of the attribute settings.

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

commit 1dc7c1fc51b4268897da277fffbac812cce94e66
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Mon Sep 28 04:42:36 2009 +0000

    Fix a bug in ocaml bindings that has incorrect linkage options.

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

commit 6625665544615314e66cbf54fe4b529a6dcd9441
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Mon Sep 28 01:28:26 2009 +0000

    Regenerate.

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

commit d42557f9880111a13da39570d5e47e69e72648df
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Mon Sep 28 01:16:42 2009 +0000

    Add a way to query the number of input files.

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

commit 3c3e02c66a2ac85384c3d7a84a02a60aa71ea591
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Mon Sep 28 01:16:07 2009 +0000

    Document the 'not' combinator.

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

commit c93d3814ca1727b694a4ac3b88a7979f61915ff7
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Mon Sep 28 01:15:44 2009 +0000

    A bit prettier formatting.

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

commit e414c1e0cd9d1c1e0e650c5710c3df04bf707762
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 00:44:15 2009 +0000

    Remove temporary debugging hack.

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

commit 07fbbcdcfb6812cd5986ccc0188b293a8d01e961
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 00:27:48 2009 +0000

    Move the dominator verification code out of special code embedded within
    the PassManager code into a regular verifyAnalysis method.

    Also, reorganize loop verification. Make the LoopPass infrastructure
    call verifyLoop as needed instead of having LoopInfo::verifyAnalysis
    check every loop in the function after each looop pass. Add a new
    command-line argument, -verify-loop-info, to enable the expensive
    full checking.

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

commit 1f7ba836613f713ff32349e1c08c152d0803100b
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 00:10:28 2009 +0000

    Move this assert to check the condition as soon as it is known.

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

commit 7265f0826dddbc1d46ad1df769a99fc81c4adfe3
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 28 00:07:05 2009 +0000

    Extend the StartPassTimer and StopPassTimer functions so that the
    code that stops the timer doesn't have to search to find the timer
    object before it stops the timer. This avoids a lock acquisition
    and a few other things done with the timer running.

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

commit 609289558295a0f4a1f6529c14ffe96db547ec41
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Sun Sep 27 23:52:58 2009 +0000

    Use movt/movw pair to materialize 32 bit constants on ARMv6T2+.
    This should be better than single load from constpool.

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

commit ee836a04ed5b6c302790bf4db303d04e17d48dfd
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 23:52:07 2009 +0000

    Fix an old copy+pasto.

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

commit a86280282a7ddd9df2015d13012ad229ccfcd383
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 23:49:43 2009 +0000

    Extract the code for inserting a loop into the loop queue into
    a separate function.

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

commit 72a3f38563c08ff695f37880ca47a0212d5eef8f
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 23:43:07 2009 +0000

    When a loop is deleted, immediately release all of the active
    LoopPasses for that loop. This avoids trouble with the PassManager
    trying to call verifyAnalysis on them, and frees up some memory
    sooner rather than later.

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

commit a27e7c0803f1ec6bd2b58dce5df419100c761c52
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 23:38:27 2009 +0000

    Extract the code for releasing a pass into a separate function, and
    tidy it up a little.

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

commit eb02188cd3e0b830856c05e6136523731ffa68f2
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 23:27:42 2009 +0000

    Remove the "metadata*" type and simplify the code it complicated. This was only
    used to support GlobalVariables storing MDNodes, back when they were derived
    from Constant before the introduction of NamedMDNode, but never removed.

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

commit 49545c765c8fc928bcda29e4f87533aced3c808f
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 23:17:47 2009 +0000

    LBRX no longer has an explicit SrcValueSDNode operand, so the type
    operand is now at index 2, rather than 3. This fixes the
    "Invalid child # of SDNode!" failures on PowerPC.

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

commit 1d1bc8e896031decb3ec0a78b58b76dc7607a840
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:46:50 2009 +0000

    simplify some code.

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

commit e8ad9aecbfae9799fb3cef18c8ecc4e9bfc8a735
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:42:46 2009 +0000

    The bitcast case is not needed here: instcombine turns icmp(bitcast(x), null) -> icmp(x, null) already.

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

commit a475d661a350f7956630f0b989c7f6aa838090c4
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 21:39:46 2009 +0000

    New unit test for the cloning module, which so far only covers cloning of
    instructions' optimization flags.

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

commit 5d1f8e4df0a7deddf1b2ee380793bd32b7c815d2
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:36:19 2009 +0000

    calls are already unmovable, malloc doesn't need a special case.

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

commit 6ad04a09b7acbcc532f109c8521281124df47cf6
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:35:11 2009 +0000

    calls to external functions are already marked overdefined, special casing
    malloc isn't needed.

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

commit 35b69d45dd8e3d9b38f8377ec723d37bd458b5c4
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:33:46 2009 +0000

    calls are already handled, malloc doesn't need a special case.

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

commit 7805c35a30b6b119e2c4b2bfd54aa484752eeef8
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 21:33:04 2009 +0000

    Round out the API for the new optimization flags.

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

commit 0a3e013c33b6cb73b01a63d5568373be55186e04
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:31:39 2009 +0000

    calls are rejected above, no need to special case malloc here.

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

commit 47fe1012616c84ce6211a298f822462db8dda2ef
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:29:28 2009 +0000

    remove special handling of bitcast(malloc), it will be handled
    when the loop inspects the bitcast operand.

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

commit 4e577c0241756a4d6350c2c310c0cb96a3ecee5e
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:23:38 2009 +0000

    unlike the malloc instruction, "malloc" calls do not claim to be readonly, just nounwind.

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

commit eb3c9102ab9db6cfde207964f78e34ceca63c57b
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 21:16:52 2009 +0000

    add a new DirectiveMap stringmap, which allows more efficient dispatching
    to directive handlers and allows for easier extensibility.

    I only switched a few over for now.

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

commit 7a54febb0063e0862aee2a084a627bb029779498
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 20:58:01 2009 +0000

    Link order: it matters.

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

commit 9b61abd17da1bff8720e5bfbb02c98fec3212ad2
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 20:46:36 2009 +0000

    allow pushing icmps through phis with multiple uses and across critical edges.
    These are important to push up to encourage jump threading.  This shrinks 176.gcc a bit.

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

commit ff5cd9de8438a1fbe450b5d0b31a9ae3a0a5fbc5
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 20:18:49 2009 +0000

    Enhance the previous fix for PR4895 to allow more values than just
    simple constants for the true/false value of the select.  We now
    do phi translation etc.  This really fixes PR4895 :)

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

commit f7843b77d709006cc6e93938f396a2aaf9dcd994
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 19:57:57 2009 +0000

    implement PR4895, by making FoldOpIntoPhi handle select conditions
    that are phi nodes.  Also tighten up FoldOpIntoPhi to treat constantexpr
    operands to phis just like other variables, avoiding moving constantexpr
    computations around.

    Patch by Daniel Dunbar.

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

commit de228ff38a94da4f7b64b2eed20195730bc565b9
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 19:38:39 2009 +0000

    avoid copying MCAsmInfo by value, add an (extremely low prio) fixme.

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

commit 4c2770bd33b6ce5587a1226d52a77a2ad5a3f345
Author: Tilmann Scheller <tilmann.scheller@googlemail.com>
Date:   Sun Sep 27 17:58:47 2009 +0000

    Use explicit structs instead of std::pair to map callee saved regs to spill slots.

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

commit 2a918d684b96d027630a6b65cc61a7dace0d8fd1
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 17:50:44 2009 +0000

    Delete a bogus comment.

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

commit bbd99f3f67dcd426cc675998c95f3a119b13b42a
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 17:48:37 2009 +0000

    Remove a redundant assert.

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

commit ed62bf33bce67ff2da6a8181428f48b2e4db03aa
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Sun Sep 27 17:47:29 2009 +0000

    Enable -g with DEBUG_SYMBOLS and --enable-debug-symbols instead of
    DEBUG_RUNTIME.

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

commit d9bf0112734209c3d98a574bdb672f2928d6ee08
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 17:46:40 2009 +0000

    Fix SCEVExpander's canonical addrec expansion code to work on loops that
    aren't in canonical loop-simplify form, since it doesn't itself depend
    on LoopSimplify. This means handling loops without preheaders and loops
    with multiple backedges.

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

commit 6ba2142e9397002278f4275ffbae6caa28342607
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 17:39:12 2009 +0000

    Add dominates and releaseMemory member functions to PostDominatorTree.

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

commit 791c8251355c2f25f39685a7deab22560793c6fa
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 16:10:30 2009 +0000

    Grab an LLVM Context from an instruction that exists rather than one
    that is deleted in some situations. This fixes a use-after-free.

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

commit fecf86a40e1d27384518d37c51470352b7c5bd91
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 15:41:19 2009 +0000

    Clarify a comment.

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

commit 7936cb8d152d2881952b0013355cbda15e57b99a
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 15:37:03 2009 +0000

    Tell ScalarEvolution to forget everything it knows about a loop before
    rotating the loop, since loop rotation is a very significant change.

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

commit 397d89ff4449862390e51f261b77f7570a95b563
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 15:32:21 2009 +0000

    Micro-optimize DerivedType::dropAllTypeUses.

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

commit 12319f23b7e7eae3c45b6a56afede0d6d88c4d6b
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 15:30:00 2009 +0000

    Instead of testing whether an instruction dominates the loop preheader,
    test whether it properly dominates the loop header. This is equivalent
    when the loop has a preheader, and has the advantage of working when
    the loop doesn't have a preheader. Since IVUsers doesn't Require
    LoopSimplify, the loop isn't guaranteed to have a preheader.

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

commit 322a984dddfb491b560d582f03b6fc7f1122bdad
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 15:26:03 2009 +0000

    Add a properlyDominates member function to ScalarEvolution.

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

commit b69db8035d9b7354a43b912ee10dc9e29006f3be
Author: Dan Gohman <gohman@apple.com>
Date:   Sun Sep 27 15:21:52 2009 +0000

    Remove a redundant #include.

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

commit 127f2c5637e7bcfda31bdb7a313726eeedb8a3ea
Author: Edwin Török <edwintorok@gmail.com>
Date:   Sun Sep 27 11:08:03 2009 +0000

    Avoid using mutex locks if not in multithreaded mode by using a SmartScopedMutex
    in RegisterStatistic.

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

commit 340684f156c06a256649f09657a198653fbe8881
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sun Sep 27 09:46:04 2009 +0000

    Enable pre-regalloc load / store multiple pass for Thumb2.

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

commit b9cb1867e50c19f73e6325a34880f259263e843e
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 08:01:44 2009 +0000

    rename REG -> REGISTER to make it explicit in the doc.  <tt>ify some stuff.

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

commit 8599166fed9834e8ba77289f61214bfd9a050b20
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 27 07:56:52 2009 +0000

    implement and document support for filecheck variables.  This
    allows matching and remembering a string and then matching and
    verifying that the string occurs later in the file.

    Change X86/xor.ll to use this in some cases where the test was
    checking for an arbitrary register allocation decision.

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

commit 3b3b54d35e1e9f0089c7efdca231a04c77e7d061
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 07:55:32 2009 +0000

    Remove dead code from this function and optimize. Update its corresponding
    LangRef entry too.

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

commit c94270c382320cb3fe9c4dc7bf31d56c94e9643d
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 07:38:41 2009 +0000

    Instruction::clone does not need to take an LLVMContext&. Remove that and
    update all the callers.

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

commit ebb9633af0245a3eaf03d2a9f4ceb6375cc8769e
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 06:25:05 2009 +0000

    Filecheckify this one test.

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

commit b7b9a48e7b9695ec1dd8d39297658aa020ff77ca
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 04:57:35 2009 +0000

    Leave a pointer to the documentation so that people don't end up change one but
    not the other in the future.

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

commit 985d6d15ded32550f7c29aa7f61efd3621562558
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 04:56:27 2009 +0000

    Correct the version numbers to match those actually tested for by
    autoconf/AutoRegen.sh.

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

commit 244cf489295b4fed69591a3c4f6404875d0d38ca
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 27 00:45:11 2009 +0000

    Move the integer type out of 'derived' and into 'primitive'. This permits us
    to explain that derived types are all composed of other types, which primitive
    types aren't. Without moving integer out of derived, this wouldn't be true.

    Perform a few trivial cleanups; 'i1' went from a link to #t_primitive to
    #t_integer (a holdover from when it was a bool type I suppose).

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

commit aa2637b6ad3234e068167af31981d688f54191b0
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 26 21:27:04 2009 +0000

    remove support for "NoSub" from regex.  It seems like a minor optimization
    and makes the API more annoying.  Add a Regex::getNumMatches() method.

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

commit e29707fa8162a0dd61380c9ca6e92a47dcb87170
Author: Edwin Török <edwintorok@gmail.com>
Date:   Sat Sep 26 20:18:58 2009 +0000

    Speed up clang-only link, by really linking only clang, and not the unittests
    too.

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

commit 7714ad64800f0e4c645ed922455ce09a71686538
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 26 18:51:37 2009 +0000

    Remove this test.

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

commit c156b7b4c9323f464900e6316b97661143631a6a
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 26 18:10:13 2009 +0000

    Fix SimplifyLibCalls to transfer attributes from callees rather than
    calls, since direct calls don't always reflect the attributes of their
    callees.

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

commit 5a1645e66706ac33ae463ef43e6328eb5b4ec309
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 26 16:11:57 2009 +0000

    Fix a case where ScalarEvolution was expanding pointer arithmetic
    to inttoptr/ptrtoint unnecessarily.

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

commit 1261dde02801ca06f9e8001747eab7fd244fa3f4
Author: Duncan Sands <baldrick@free.fr>
Date:   Sat Sep 26 15:35:35 2009 +0000

    For the NSWSub support in the builder to actually be useable,
    there need to be corresponding changes to the constant folders,
    done in this patch.

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

commit 2221f5657297e8c645617e7304d360aceda1b409
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 26 15:24:17 2009 +0000

    Convert comparisons like (x == infinity) to (x >= infinity) on targets
    where FCMP_OEQ is not legal and FCMP_OGE is, such as x86.

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

commit b2b6ab5a11661fd22b5020a1175ca3715b02a509
Author: Duncan Sands <baldrick@free.fr>
Date:   Sat Sep 26 15:21:48 2009 +0000

    Add methods for creating NSW subtraction, as already exists
    for addition.

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

commit 01d166b12f2eed6b31154b48f3f94c45e0b0977f
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 26 15:09:53 2009 +0000

    Add a comment describing natural loops.

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

commit a7468751ace00baa201c34277c85ae20a896dd90
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 26 05:29:36 2009 +0000

    "Update" tests for -disable-if-conversion removal. I think branch.ll should just
    be removed, but I XFAIL'd it for now.

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

commit 0e367e3f0866e9f690b307b4feefaec8d4a3bdfb
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 26 02:49:49 2009 +0000

    Really remove this option.

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

commit c2bb61fd9699873daeba366e97019d660c4006ca
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 26 02:45:45 2009 +0000

    Remove a couple of unused command line options.

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

commit 7f4c4564fc1f3955b136a050941b236467fca747
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 26 02:43:36 2009 +0000

    Add comment.

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

commit 4c1d7673235202816e1027e08eb16cf6123fe1a4
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 26 02:41:17 2009 +0000

    Convert test to filecheck.

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

commit 7da0592edfecaac630500ce491f7e339d416be60
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 26 02:34:00 2009 +0000

    Don't hoist or sink instructions with physreg uses if the physreg is
    allocatable. Even if it doesn't appear to have any defs, it may latter
    on after register allocation.

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

commit 40dcae418d4fb290bedfd5a22eb9a63c40c1dc84
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 26 01:11:57 2009 +0000

    I put the wrong rdar number in this test.

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

commit 13b1ad6276483958045c11cb589586e0fb0959ed
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 23:58:45 2009 +0000

    Unbreak MachineLICM for instructions that reference RIP on x86-64 too.

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

commit 6408b97d7cfea3250c4ada4d8ad08188d68cb9c0
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 23:40:21 2009 +0000

    Rename ConstantFP's getInf to getInfinity.

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

commit 232e4448242ec67d6a7b48906002ab7c3f7af96c
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 23:33:20 2009 +0000

    Move MachineMemOperand::getAlignment out of line, to avoid needing
    MathExtras.h in MachineMemOperand.h.

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

commit 75b79e54a4fd0ea94c2bc91ab7ac3c6248d1af5c
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 25 23:26:56 2009 +0000

    Remove unused variable.

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

commit b99d6f9e77125bd9ebf9ebe6df0050b974b8aa5e
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 23:10:17 2009 +0000

    Transform pow(x, 0.5) to (x == -inf ? inf : fabs(sqrt(x))), which is
    typically faster then doing a general pow.

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

commit 43dcfc7462c5602f9f840c6905f905b63a1d8937
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 23:00:48 2009 +0000

    Add a ConstantFP::getInf utility function for creating infinity ConstantFPs.

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

commit 5dedd5c716f4c2741afd8ac264d5e4e09adbcf1b
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 22:53:29 2009 +0000

    Fix MachineSink to be able to sink instructions that use physical registers
    which have no defs anywhere in the function. In particular, this fixes sinking
    of instructions that reference RIP on x86-64, which is currently being modeled
    as a register.

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

commit e222c72bba42281674d39d3d33dd75fb8f926ce5
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Fri Sep 25 22:53:17 2009 +0000

    Regenerate

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

commit bd623a83da8cc21ab3fd2ec6175041ee68f5171d
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Fri Sep 25 22:52:29 2009 +0000

    Provide proper masks for neon perfect shuffle table.
    I definitely need to read documentation better :(

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

commit 04abe740fc7391473a417d498535eed8fd834a4b
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 22:26:13 2009 +0000

    Simplify a few more uses of reg_iterator.

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

commit 282a4ab6f595a493b5fe6cdd36ff9673454e1f16
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 22:24:52 2009 +0000

    Simplify this code by using use_iterator instead of reg_iterator
    and skipping the defs.

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

commit 65561df4eb4eb52ebf75755e9f9eafa36929fa0e
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 25 21:44:53 2009 +0000

    Code clean up and prepare for Thumb2 support. No functionality changes.

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

commit c9122db8146cea80861ecaac6566ae8f75ed2497
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 25 21:38:11 2009 +0000

    Flip -disable-post-RA-scheduler to -post-RA-scheduler.

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

commit 41a338b1690f69bf6f35349e064e6c2543b15a6a
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Fri Sep 25 21:07:20 2009 +0000

    Fix a compile failure introduced by r82675 on MinGW which doesn't have
    setenv().  This patch just disables the test rather than getting putenv() to
    work.  Thanks to Sandeep Patel for reporting the problem.

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

commit c78858514eb50d76bd73ca360f58971ff9bc4ac4
Author: Dale Johannesen <dalej@apple.com>
Date:   Fri Sep 25 20:54:50 2009 +0000

    Handle sqrt in CannotBeNegativeZero.  absf and absl
    appear to be misspellings, removed in favor of fabs*.

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

commit 4e3bb1bc735783b73f2dcca82c86b7faca1a87e8
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 20:36:54 2009 +0000

    Improve MachineMemOperand handling.
     - Allocate MachineMemOperands and MachineMemOperand lists in MachineFunctions.
       This eliminates MachineInstr's std::list member and allows the data to be
       created by isel and live for the remainder of codegen, avoiding a lot of
       copying and unnecessary translation. This also shrinks MemSDNode.
     - Delete MemOperandSDNode. Introduce MachineSDNode which has dedicated
       fields for MachineMemOperands.
     - Change MemSDNode to have a MachineMemOperand member instead of its own
       fields with the same information. This introduces some redundancy, but
       it's more consistent with what MachineInstr will eventually want.
     - Ignore alignment when searching for redundant loads for CSE, but remember
       the greatest alignment.

    Target-specific code which previously used MemOperandSDNodes with generic
    SDNodes now use MemIntrinsicSDNodes, with opcodes in a designated range
    so that the SelectionDAG framework knows that MachineMemOperand information
    is available.

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

commit 61fda0d889b3578fe435455679182c231a649aac
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 18:54:59 2009 +0000

    Rename getTargetNode to getMachineNode, for consistency with the
    naming scheme used in SelectionDAG, where there are multiple kinds
    of "target" nodes, but "machine" nodes are nodes which represent
    a MachineInstr.

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

commit 36bff0c1f84aa517c66320c6864e4443e818e574
Author: David Goodwin <david_goodwin@apple.com>
Date:   Fri Sep 25 18:38:29 2009 +0000

    Finish scheduling itineraries for NEON.

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

commit ba159cf257a14d31d2dbbe8b52e934c9f8af85fb
Author: Dale Johannesen <dalej@apple.com>
Date:   Fri Sep 25 18:15:29 2009 +0000

    Add readonly to some sin and cos calls; transformations
    being checked aren't valid without it.

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

commit 131e0fcf808340c24aa7f519b7108121142a9b4b
Author: Victor Hernandez <vhernandez@apple.com>
Date:   Fri Sep 25 18:11:52 2009 +0000

    Revert 82694 "Auto-upgrade malloc instructions to malloc calls." because it causes regressions in the nightly tests.

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

commit bccd219ac7eb590d369f9bda03ade6467aa49e24
Author: Dale Johannesen <dalej@apple.com>
Date:   Fri Sep 25 18:00:35 2009 +0000

    Make sure sin, cos, sqrt calls are marked readonly
    before producing FSIN, FCOS, FSQRT.  If they aren't
    so marked we have to assume they might set errno.

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

commit e2bc7c2439c37d883c22dd27c87301a4e2c935b3
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 25 17:29:36 2009 +0000

    reject attempts to use ()'s in patterns, these are reserved for filecheck.

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

commit ce89de231525a80c137a1de88fb8d0467c6ce973
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 25 17:23:43 2009 +0000

    reimplement the regex matching strategy by building a single
    regex and matching it instead of trying to match chunks at a time.
    Matching chunks at a time broke with check lines like
      CHECK: foo {{.*}}bar
    because the .* would eat the entire rest of the line and bar would
    never match.

    Now we just escape the fixed strings for the user, so that something
    like:
      CHECK: a() {{.*}}???
    is matched as:
      CHECK: {{a\(\) .*\?\?\?}}
    transparently "under the covers".

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

commit 8891e4478909879ca4f4e745312b542cc8aca7e6
Author: Dale Johannesen <dalej@apple.com>
Date:   Fri Sep 25 17:23:22 2009 +0000

    Generate FSQRT from calls to the sqrt function, which
    allows appropriate backends to generate a sqrt instruction.

    On x86, this isn't done at -O0 because we go through
    FastISel instead.  This is a behavior change from before
    this series of sqrt patches started.  I think this is OK
    considering that compile speed is most important at -O0, but
    could be convinced otherwise.

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

commit f6f6363c80e0e1fd4ff8e20a8f259d1e66310a1f
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 25 17:09:12 2009 +0000

    special case Patterns that are a single fixed string.  This is a microscopic
    perf win and is needed for future changes.

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

commit 4730cd3d31451fb62c8c8401cceee4439b7c1626
Author: Dale Johannesen <dalej@apple.com>
Date:   Fri Sep 25 17:04:42 2009 +0000

    Revise C library functions description to be vaguer, per Chris.

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

commit e2de471c77ff3baeac8e535fffc28de1e57799a9
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Fri Sep 25 16:46:09 2009 +0000

    This patch causes the --enable-debug-runtime configure flag and the
    DEBUG_RUNTIME Makefile variable to pass -g to gcc when building LLVM's objects.
    Without this, it's very hard to debug crashes that happen in Release-Asserts
    mode but not Debug mode.

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

commit e55e52532c4a76b7ec83e530e3fe3b0bc0b8c00c
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Fri Sep 25 16:34:46 2009 +0000

    Add some comments to clarify things that I discovered this week.

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

commit bd4cb23f6a5954a3fff1afe6f807c02eab8910e9
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 25 16:04:21 2009 +0000

    Make llvm-bcanalyzer percentages more readable.

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

commit 14a16fee44fce77ae10d7144e547b7b8bed872b6
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 25 16:03:57 2009 +0000

    Strip trailing whitespace.

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

commit c1c8b5e19b33c8b5e52c4b516669181f18feb98e
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Fri Sep 25 14:41:49 2009 +0000

    pr4926: ARM requires the stack pointer to be aligned, even for leaf functions.
    For the AAPCS ABI, SP must always be 4-byte aligned, and at any "public
    interface" it must be 8-byte aligned.  For the older ARM APCS ABI, the stack
    alignment is just always 4 bytes.  For X86, we currently align SP at
    entry to a function (e.g., to 16 bytes for Darwin), but no stack alignment
    is needed at other times, such as for a leaf function.

    After discussing this with Dan, I decided to go with the approach of adding
    a new "TransientStackAlignment" field to TargetFrameInfo.  This value
    specifies the stack alignment that must be maintained even in between calls.
    It defaults to 1 except for ARM, where it is 4.  (Some other targets may
    also want to set this if they have similar stack requirements. It's not
    currently required for PPC because it sets targetHandlesStackFrameRounding
    and handles the alignment in target-specific code.) The existing StackAlignment
    value specifies the alignment upon entry to a function, which is how we've
    been using it anyway.

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

commit 8c417db6fa3361d12502438264a66352a8fd6531
Author: Duncan Sands <baldrick@free.fr>
Date:   Fri Sep 25 12:28:37 2009 +0000

    Print INST_INBOUNDS_GEP rather than UnknownCode30.
    Likewise for constant inbounds GEP.

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

commit d777d83398260186ab5744a6eb01e55e3d8757fd
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 25 06:49:41 2009 +0000

    convert testcases to filecheck.

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

commit d33999c4a5ccdb8cd555477e51987ce6c3ed1f04
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 25 06:47:09 2009 +0000

    filecheck should not match a \n with a .

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

commit 57f2699a01d2bf5a7544da99676c612955bbd05f
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 25 06:37:22 2009 +0000

    remove a large unreduced testcase

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

commit 8527c712c7db0d0f0a31c225024bbef3f2dde62d
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 25 06:32:47 2009 +0000

    turn a std::pair into a real class.

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

commit aec69ee8287d0ac26b45fb20240af79e5497ef01
Author: Nate Begeman <natebegeman@mac.com>
Date:   Fri Sep 25 06:05:26 2009 +0000

    Fix combiner-aa issue with bases which are different, but can alias.
    Previously, it treated GV+28 GV+0 as different bases, and assumed they could
    not alias.

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

commit cbaa5bdd135396a097a648574a6706eec224e5ec
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Fri Sep 25 05:30:55 2009 +0000

    Update the description of MachineFrameInfo's OffsetAdjustment.  The value of
    this adjustment does not change the direction or the signs of the object
    offsets, and the details of the offset calculations can be target-specific.
    Also mention that for most targets this value is only used to generate debug
    info.

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

commit 06d175346442b0b31427d8806d5022c3248bf674
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 00:57:30 2009 +0000

    Don't try to use pre-indexed addressing with sthbrx/stwbrx
    instructions. This fixes a PowerPC bug exposed by some unrelated
    changes I'm working on.

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

commit 594bb86a065af025a8fd90ef486d9f54fb869f95
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 25 00:34:34 2009 +0000

    Add a version of dumpr() that has a SelectionDAG* argument.

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

commit abd0e3ddaf34e1589bae68eecb9fcfb7f14ac297
Author: Jim Grosbach <grosbach@apple.com>
Date:   Thu Sep 24 23:52:18 2009 +0000

    Start of revamping the register scavenging in PEI. ARM Thumb1 is the driving
    interest for this, as it currently reserves a register rather than using
    the scavenger for matierializing constants as needed.

    Instead of scavenging registers on the fly while eliminating frame indices,
    new virtual registers are created, and then a scavenged collectively in a
    post-pass over the function. This isolates the bits that need to interact
    with the scavenger, and sets the stage for more intelligent use, and reuse,
    of scavenged registers.

    For the time being, this is disabled by default. Once the bugs are worked out,
    the current scavenging calls in replaceFrameIndices() will be removed and
    the post-pass scavenging will be the default. Until then,
    -enable-frame-index-scavenging enables the new code. Currently, only the
    Thumb1 back end is set up to use it.

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

commit f47ed3b170f267cc8eb18d841e16fc60e900e9bf
Author: Dale Johannesen <dalej@apple.com>
Date:   Thu Sep 24 23:37:40 2009 +0000

    Reenable sqrt IR generation test.

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

commit 2fd84e281e90d309c22639a7ba9585871050e777
Author: Mike Stump <mrs@apple.com>
Date:   Thu Sep 24 23:21:26 2009 +0000

    Delete space after function name, before (, reflow a comment and
    delete a few blank lines.

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

commit cf991836d66fafd16a28b20a04bbff143c99e700
Author: Mike Stump <mrs@apple.com>
Date:   Thu Sep 24 23:11:08 2009 +0000

    Fix spacing.

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

commit f55e81bef95886581ceb0597e7e6c4838e5cf002
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 21:47:32 2009 +0000

    add and document regex support for FileCheck.  You can now do stuff like:

    ; CHECK: movl {{%e[a-z][xi]}}, %eax

    or whatever.

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

commit 2255c43ab2731fee0d00702175336d4b42ba9e0e
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 21:45:57 2009 +0000

    unconditionally request MMI

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

commit c77786ebfb8a4dcf223031c7140e454fad3aa702
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 21:44:20 2009 +0000

    wrap long lines.

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

commit edc81f3d96a63163abf9f4b17eb9fdc8068cd9cf
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 20:45:07 2009 +0000

    Use CanonicalizeInputFile to canonicalize the entire buffer containing the
    CHECK strings, instead of canonicalizing the patterns directly.  This allows
    Pattern to just contain a StringRef instead of std::string.

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

commit bbb96e5913e916ab74cd4cec3ec40e8fa9942dda
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 20:39:13 2009 +0000

    change 'not' matching to use Pattern, move pattern parsing logic into
    the Pattern class.

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

commit 5ee02f11e57a367a7dbdc855d65a66ab3442e177
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 20:25:55 2009 +0000

    refactor out the match string into its own Pattern class.

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

commit 16905eda1a5f9e55bc061df7018afc1264258b85
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Thu Sep 24 20:23:02 2009 +0000

    Convert to FileCheck.

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

commit ed17499ee7446c5da5638f6c4c34eea660808a3d
Author: David Goodwin <david_goodwin@apple.com>
Date:   Thu Sep 24 20:22:50 2009 +0000

    Make the end-of-itinerary mark explicit. Some cleanup.

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

commit 7f3103731c7d2ee3608f401031d0b9f785293e35
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 24 20:20:08 2009 +0000

    Add nounwind to this test.

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

commit 81f61b9291284bd0dc93d9dc333c1962a4399719
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 20:15:51 2009 +0000

    tidy up, fix a memory leak in Regex::isValid

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

commit 9fcf4a9c8f35d53460b62db4a13fa14c7e1d1676
Author: Dale Johannesen <dalej@apple.com>
Date:   Thu Sep 24 18:38:21 2009 +0000

    Clarify that llvm attaches C language semantics to
    functions with names that match the C library.

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

commit 129b2d16553e46db3b5675b63e777931e2ea4cec
Author: Edwin Török <edwintorok@gmail.com>
Date:   Thu Sep 24 18:33:42 2009 +0000

    Constant propagating byval pointer is safe if function is readonly.

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

commit b493c9735a034856258c992d967b523d0effa7ce
Author: Victor Hernandez <vhernandez@apple.com>
Date:   Thu Sep 24 17:47:49 2009 +0000

    Auto-upgrade malloc instructions to malloc calls.

    Reviewed by Devang Patel.

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

commit 92244901c3c0101b8114ffa52c1dcf0e9cda72a1
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Thu Sep 24 16:42:27 2009 +0000

    Fix a hypothetical problem for targets with StackGrowsUp and a non-zero
    LocalAreaOffset.  (We don't have any of those right now.)
    PEI::calculateFrameObjectOffsets includes the absolute value of the
    LocalAreaOffset in the cumulative offset value used to calculate the
    stack frame size.  It then adds the raw value of the LocalAreaOffset
    to the stack size.  For a StackGrowsDown target, that raw value is negative
    and has the effect of cancelling out the absolute value that was added
    earlier, but that obviously won't work for a StackGrowsUp target.  Change
    to subtract the absolute value of the LocalAreaOffset.

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

commit ef534da2d0f3316b5ad378a00899e8d127362b5d
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Sep 24 16:19:11 2009 +0000

    Move parent assertion check before metadata deletion.

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

commit d54353779c9a33c745178f01785113300c7acb0e
Author: Edwin Török <edwintorok@gmail.com>
Date:   Thu Sep 24 09:47:18 2009 +0000

    Don't constant propagate byval pointers, since they are not really pointers, but
    rather structs passed by value.
    This fixes PR5038.

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

commit a8b807194946fe34f364a39721205c00c1906482
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 24 06:23:57 2009 +0000

    Add count/not tools as executables.
     - Apparently, I'm willing to do incredibly stupid things in the name of portability.

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

commit c73e8ebf88f2c21b857296951b4babc6bd404426
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 05:44:53 2009 +0000

    unconditionally compute MMI even if the target doesn't support EH or Debug info, because the target may use it for other things, this fixes PR5036

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

commit c8b70669b5480ad74079a8b8424d58c51b0cfa84
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 24 05:38:36 2009 +0000

    reapply r82348 with a fix, thanks Jeffrey.

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

commit f33cdc3f423b26e209fd058d50acea55966adb00
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 24 02:27:09 2009 +0000

    Fix PR5024 with a big hammer: disable the double-def assertion in the scavenger.

    LiveVariables add implicit kills to correctly track partial register kills. This works well enough and is fairly accurate. But coalescer can make it impossible to maintain these markers. e.g.

            BL <ga:sss1>, %R0<kill,undef>, %S0<kill>, %R0<imp-def>, %R1<imp-def,dead>, %R2<imp-def,dead>, %R3<imp-def,dead>, %R12<imp-def,dead>, %LR<imp-def,dead>, %D0<imp-def>, ...
    ...
    	%reg1031<def> = FLDS <cp#1>, 0, 14, %reg0, Mem:LD4[ConstantPool]
    ...
       	%S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill>

    When reg1031 and S0 are coalesced, the copy (FCPYS) will be eliminated the the implicit-kill of D0 is lost. In this case it's possible to move the marker to the FLDS. But in many cases, this is not possible. Suppose

    	%reg1031<def> = FOO <cp#1>, %D0<imp-def>
    ...
       	%S0<def> = FCPYS %reg1031<kill>, 14, %reg0, %D0<imp-use,kill>

    When FCPYS goes away, the definition of S0 is the "FOO" instruction. However, transferring the D0 implicit-kill to FOO doesn't work since it is the def of D0 itself. We need to fix this in another time by introducing a "kill" pseudo instruction to track liveness.

    Disabling the assertion is not ideal, but machine verifier is doing that job now. It's important to know double-def is not a miscomputation since it means a register should be free but it's not tracked as free. It's a performance issue instead.

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

commit 04f3d1de138c7ebffc1d37a273e5a8675b6a933d
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 24 02:15:22 2009 +0000

    Clean up LiveVariables and change how it deals with partial updates and kills. This also eliminate the horrible check which scan forward to the end of the basic block. It should be faster and more accurate.

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

commit 07c5e3ce817f75c90d00d48b0acd765e4e9ec6b5
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Thu Sep 24 01:14:07 2009 +0000

    Roll back r82348, which introduced an infinite loop in ParseCStringVector() that
    a trivial unittest would have caught.  This revision also adds the trivial
    unittest.

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

commit f1b016061ea1eb7a321b1b4d20976a651b3c24b6
Author: Dale Johannesen <dalej@apple.com>
Date:   Wed Sep 23 22:05:24 2009 +0000

    A minor improvment in accuracy to inline cost
    computation, and some cosmetics.

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

commit 7b4f81c688a6b32d799f7e0b95f6fe131d7ffb24
Author: Dale Johannesen <dalej@apple.com>
Date:   Wed Sep 23 21:46:36 2009 +0000

    Disable test; what it's testing for is wrong.

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

commit 78caa12a415bbd16db04088be6378398d4909b6f
Author: David Goodwin <david_goodwin@apple.com>
Date:   Wed Sep 23 21:38:08 2009 +0000

    Checkpoint NEON scheduling itineraries.

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

commit ad4880332c61c808014c202255dce5f8fafe581e
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 23 21:07:02 2009 +0000

    Use getStoreSize() instead of getStoreSizeInBits()/8.

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

commit 63521d0ab0566f418464b29e5ac6cca7710ae094
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 23 21:06:36 2009 +0000

    Spruce up some comments.

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

commit 3bab1f776cf32aadd62d490f54cec968ef38eec7
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 23 21:02:20 2009 +0000

    Rename several variables from EVT to more descriptive names, now that EVT
    is also the name of their type, as declarations like "EVT EVT" look
    really odd.

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

commit a387c633b81a60a676445c8d89513a7518b8f7fc
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 23 20:59:10 2009 +0000

    Add an EVT::getStoreSize function, like getStoreSizeInBits but in bytes.

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

commit ef0853ae5ef4ef4dac82362ecb914ad2b3df1ae0
Author: Jakob Stoklund Olesen <stoklund@2pi.dk>
Date:   Wed Sep 23 20:57:55 2009 +0000

    Fix verification of explicit operands.

    The machine code verifier did not check for explicit operands correctly. It
    used MachineInstr::getNumExplicitOperands, but that method may cheat and use
    the declared count in the TargetInstrDesc.

    Now we check the explicit operands one at a time in visitMachineOperand.

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

commit 95e76c5aee19e6e44bda135a7f7a32c2602c493f
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 23 20:57:02 2009 +0000

    Remove BlackfinRegisterInfo::getFrameIndexOffset since it is the same as the
    default implementation.  Update comment on the default version, which made it
    sound like most targets override it.  Currently only X86 and SystemZ override
    this method.

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

commit 1f939a29fdfdfc31e521209c44fc1ca3b1ecfc6f
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 23 20:40:16 2009 +0000

    Correct a comment.

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

commit 579edbf7bf65497e3afa498baaf1cb6642ef3de0
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 23 20:33:51 2009 +0000

    Delete attached metadata when an instruction is deleted.

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

commit 3fad552803d264b6bf83981de305e7080cb8ef4f
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Wed Sep 23 19:04:09 2009 +0000

    ARM does not support offset folding (yet). Disable it for now.
    This fixes PR5031. Unfortunately, there is no small testcase :(

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

commit a9b57edff7a7dbf11ba9fe787349d21f7e3e80f6
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 23 18:53:19 2009 +0000

    Edit a comment.

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

commit 6b7c1e84c407ef2ba17ed953f0368eb54a5ef106
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 23 18:32:25 2009 +0000

    Do not leave behind metadata while cloning an instruction.

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

commit 724190977bf4a7289c24e923f33ad6b7e172cfbf
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 23 18:20:27 2009 +0000

    Add nounwind.

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

commit 7fdd6fe71635b720cb3c47fe9bbe4c7587cb027d
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 23 17:20:43 2009 +0000

    s/*Location/*DebugLocation/g

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

commit 35659ae0fc161cf474f5ca81c497d58a90b7c4e0
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Wed Sep 23 17:05:42 2009 +0000

    PR4047: Permit configure --enable-targets=host,cpp for example.  "host" has the
    same effect that "host-only" used to have, but can be combined with other
    targets.  host-only is still available as a synonym but no longer documented.

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

commit 83b6ace01ffb5d8d495a4b70c7406d06f0dd2067
Author: David Goodwin <david_goodwin@apple.com>
Date:   Wed Sep 23 16:35:25 2009 +0000

    Fix bug in kill flag updating for post-register-allocation scheduling. When the kill flag of a superreg needs to be cleared because there are one or more subregs live, we instead add implicit-defs of those subregs and leave the kill flag on the superreg. This allows us to end the live-range of the superreg without ending the live-ranges of the subregs.

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

commit 5faba0e3a308107b7a40b53ea72b6bfbdd19e28b
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Wed Sep 23 11:48:57 2009 +0000

    Fix a struct/class mismatch.

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

commit e9cbef31ba8c374d41249635197e58c102fe41fb
Author: John McCall <rjmccall@apple.com>
Date:   Wed Sep 23 06:53:51 2009 +0000

    Make the type traits for a const pointer defer to those for a unqualified
    pointer, instead of providing independent values modelled on the default
    implementation.

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

commit d062bf740651c35ed3ee80b66b02d8363fd14a3a
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 23 06:28:31 2009 +0000

    Fix PR5024. LiveVariables physical register defs should *commit* only after all
    of the defs are processed.
    Also fix a implicit_def propagation bug: a implicit_def of a physical register
    should be applied to uses of the sub-registers.

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

commit 29a1c10040effaa8c0968a3899b053b6b591a73a
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 23 05:23:19 2009 +0000

    Fix a obvious logic error.

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

commit d3593be80c4db01a12d00222ccd196fb10ddc766
Author: Gabor Greif <ggreif@gmail.com>
Date:   Wed Sep 23 02:46:12 2009 +0000

    pretty mechanical changes to match coding guidelines (blessed by sabre on IRC)

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

commit 03344a20c2a1d291282ead342f0bfb858909c7dc
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 23 02:03:49 2009 +0000

    errorstr can be null, don't unconditionally set it.  Only report that
    "the jit has not been linked in" if the interpreter failed.

    This fixes a unit test failure.

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

commit cd0d937f2811e62d66743e588b0a2e0154af2411
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 23 01:46:04 2009 +0000

    Make EngineBuilder return more error codes, by KS Sreeram.

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

commit 915d872b7a05774ea93ba7fbb25f0944d62e10fb
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 23 01:33:16 2009 +0000

    Give MachineMemOperand an operator<<, factoring out code from
    two different places for printing MachineMemOperands.

    Drop the virtual from Value::dump and instead give Value a
    protected virtual hook that can be overridden by subclasses
    to implement custom printing. This lets printing be more
    consistent, and simplifies printing of PseudoSourceValue
    values.

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

commit 17f460a7f0b06133486bf897cc67373e07687bf2
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 23 01:29:41 2009 +0000

    Fix X86's unfoldMemoryOperand to properly handle MachineMemOperands.

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

commit 069f1c9642c471d827cfaaca98f31aef707464ee
Author: Mike Stump <mrs@apple.com>
Date:   Wed Sep 23 00:13:30 2009 +0000

    This is overly constraining with respect to clang.

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

commit efb268acfd0ecf9b39a555267393058e685030fb
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Tue Sep 22 21:15:19 2009 +0000

    Add examples for Kaleidoscope chapters 2 through 6.

    Conflicts:

    	examples/Makefile

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

commit 2a20265022d36c31bdf7c4f041b10695bcb09c45
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Tue Sep 22 21:15:00 2009 +0000

    Rename Kaleidoscope to show that it's for Chapter 7 of the tutorial.

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

commit fb577b0367500de745082228b0a1569365ecc68c
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Tue Sep 22 21:14:49 2009 +0000

    Sync c++ kaleidoscope tutorial with test.

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

commit 191278d73343733b56e030ace8f6a9dcdf08818a
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 22 20:56:31 2009 +0000

    Add SetLocation() to allow IRBuilder user to set location info for an instruction already created.

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

commit 5ffdd0e9c3eb03b473ddf666c885cecbc15f8df7
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 22 20:54:13 2009 +0000

    Check exisiting dbg MDKind first.

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

commit d80fa7f67d06ef47913578a8212be349722a9df5
Author: Victor Hernandez <vhernandez@apple.com>
Date:   Tue Sep 22 18:50:03 2009 +0000

    No need to verify that malloc's return type is i8*.

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

commit cc74792c99e085a14bdd6db9edea362b465406da
Author: David Goodwin <david_goodwin@apple.com>
Date:   Tue Sep 22 16:47:52 2009 +0000

    Use early returns.

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

commit 9f854de1b687e0906e7521393f1fa176e4b15b52
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 16:33:42 2009 +0000

    Revert "Don't allow formatted_ostream to be unbuffered, even if its underlying
    buffer", while we work out a solution.

    Dan convinced me that making debugging annoying for him is worse than 10x being
    slower for me. :)

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

commit f54515d6770a86c4268b41a60a9536b4993e6400
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 16:10:35 2009 +0000

    ... missed hiding a variable for MSVC only.

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

commit 441722f4b863b8b9ac8410c2c36217596252dbd6
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 15:58:35 2009 +0000

    Hide MSVC specific CRT interaction behind _MSC_VER.

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

commit ed6353b87ccbbf7ddaa63a25bfad14afc3079da0
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Tue Sep 22 15:40:32 2009 +0000

    Remove the GetProcessId() call from Win32/Program.inc, take 2.

    GetProcessId() was introduced only in Windows XP, and we want to support earlier
    versions.

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

commit c2d3000deec82fd0c808af98c089e5eb628ef47b
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 10:30:34 2009 +0000

    Fix commento.

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

commit 6463aedb7b4da91f81362b039b697ee0fed50312
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 09:50:38 2009 +0000

    lit: When executing shell scripts internally, don't allow piped stderr on any
    commands except the last one, instead redirect the stderr to a temporary
    file. This sidesteps a potential deadlocking issue.

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

commit 1e57bc8dcf0be1c58fdb06bb83c34b140b9074fa
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 09:50:28 2009 +0000

    Add a magic LLVM_DISABLE_CRT_DEBUG environment variable which we check in RegisterHandler and use to disable the Win32 crash dialogs. These are a major blocker to any kind of automated testing.

    Also, tweak the 'lit' test runner to set this variable unconditionally.

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

commit ff8e568bb5c578639e690ba4e2f0499f3dd78b46
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 22 08:47:59 2009 +0000

    Forgot this.

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

commit cd216d523e696749d681faca9f3bda92b13cd695
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 22 08:34:46 2009 +0000

    Fix PR5024. LiveVariables::FindLastPartialDef should return a set of sub-registers that were defined by the last partial def, not just a single sub-register.

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

commit a4acff7bb0d00b82a152fe067335260a42b5cab1
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 07:38:44 2009 +0000

    Initial support for running LLVM tests from cmake.

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

commit a018c74c2f4f93f08050ac2dc1c616f8b106dc39
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 07:38:33 2009 +0000

    Generate lit.site.cfg from a .in file, as clang does.

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

commit cd2674d181e3edb1700721bed54e790cd9c5f4a7
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 07:38:23 2009 +0000

    Use Compiler.h macro instead of __attribute__.

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

commit b7784533131d4921046a46a406b1e198863e6d11
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 06:09:37 2009 +0000

    CMake: Fix definition of LTDL_SHLIB_EXT for Darwin.

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

commit c4e0f91cc54f6399b3e9be19a12aaa4dcbfffaff
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 06:09:31 2009 +0000

    Fix llvm-config --src-root and --obj-root for CMake builds.

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

commit 2be1b773bb528a793ed59869ad275ac74aad2b77
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 06:09:22 2009 +0000

    llvm-config: Remove unused variables.

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

commit 346a7bb311e53d4af9e8dd3063b10e7323e31c95
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 06:09:13 2009 +0000

    Actually use the arguments with the resolved executable path.

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

commit 0dfef16716fc2c26777f8404c8fa073cd42bc57e
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 04:44:56 2009 +0000

    Revert "Get rid of GetProcessId in Win32/Program.inc.", this breaks
    ExecuteAndWait.

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

commit dce584a533e962394daa5fa66065ddb344467c47
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 04:44:37 2009 +0000

    lit: Don't use close_fds=True on Windows.

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

commit a5e3ec7946254a90b806176d1868ca919da6c35f
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 04:44:26 2009 +0000

    lit: When executing commands internally, perform PATH resolution ourselves.

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

commit 4cf9e690c5df0d90fdada4eabd3b203e4e906325
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 03:34:53 2009 +0000

    Switch FoldingSet::AddString to StringRef based API.
     - This also fixes a dereference of std::string::end, which makes MSVC unhappy and was causing all the static analyzer clang tests to fail.

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

commit fa985152c3d160701fa55af97f598a478c3a456e
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 03:34:40 2009 +0000

    Workaround what I believe is an MSVC bug where it emits a definition for a
    static const class member into each translation unit, with external linkage???
     - If someone understands this issue better, please clue me in, I haven't
       consulted the standard yet.

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

commit c27a50855925ba7455c4049398c80db45fcef36a
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 02:03:18 2009 +0000

    Switch DIDescriptor to use a TrackingVH. - This makes it much safer to work with debug info, since it was extraordinarily easy to have dangling pointers thanks to MDNode uniquing.

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

commit 4f912e5070e7e43b4bd9def2d9f1038254c5806c
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 22 02:02:33 2009 +0000

    Add a TrackingVH value handle.

    This is designed for tracking a value even when it might move (like WeakVH), but it is an error to delete the referenced value (unlike WeakVH0. TrackingVH is templated like AssertingVH on the tracked Value subclass, it is an error to RAUW a tracked value to an incompatible type.

    For implementation reasons the latter error is only diagnosed on accesses to a mis-RAUWed TrackingVH, because we don't want a virtual interface in a templated class.

    The former error is also only diagnosed on access, so that clients are allowed to delete a tracked value, as long as they don't use it. This makes it easier for the client to reason about destruction.

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

commit b6d716f620ad28e540c2a262504ebaeff6461b3f
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 22 01:48:19 2009 +0000

    Fix a pasto. Also simplify for Bill's benefit.

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

commit eb21e377d210da64284a7e52ca694e0f42b5062d
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 22 00:29:40 2009 +0000

    Minor bug fix. LowerSubregs should translate
    %S0<def> = EXTRACT_SUBREG %Q0<kill>, 1
    to
    %S0<def> = IMPLICIT_DEF %Q0<imp-use,kill>

    Implicit_def does not *read* any register so the operand should be marked "implicit". The missing "implicit" marker on the operand is wrong, but it doesn't actually break anything.

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

commit 321b572fd6b43198d21fe25f1a5ae5d5e8af50bf
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 22:39:35 2009 +0000

    Fix PR5023: The instruction form of DominatorTree::dominates did not
    take into consideration that the result of an invoke is only valid in
    the normal dest, not the unwind dest.  This caused 'PHINode::hasConstantValue'
    to return true in an invalid situation, causing mem2reg to delete a phi that
    was actually needed.  This caused a crash building 483.xalancbmk.

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

commit b171ff4d2cc5feb820dee24b5e6ad004493b8576
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 22:30:50 2009 +0000

    move DominatorTree::dominates for instructions out of line,
    no functionality change.

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

commit a5456988b7e38012abf0b14767f0752f87520a44
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 22:27:34 2009 +0000

    tidy up

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

commit 1e683894a5d61beccb7a58ffa70be000eee12a73
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 22:26:02 2009 +0000

    tidy up

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

commit b9bbb5795a133c6cca6a5ac4e5ab110016d4e7c1
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Mon Sep 21 21:12:25 2009 +0000

    Clean up spill weight computation. Also some changes to give loop induction
    variable increment / decrement slighter high priority.

    This has major impact on some micro-benchmarks. On MultiSource/Applications
    and spec tests, it's a minor win. It also reduce 256.bzip instruction count
    by 8%, 55 on 164.gzip on i386 / Darwin.

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

commit 35d4912e3b08a8a2d0e01c0ef8b23407f8efa8db
Author: David Goodwin <david_goodwin@apple.com>
Date:   Mon Sep 21 20:52:17 2009 +0000

    Add Cortex-A8 VFP model.

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

commit 169948d4180417313f5332b85d2572520592de3c
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 21 19:47:04 2009 +0000

    Change MachineMemOperand's alignment value to be the alignment of
    the base pointer, without the offset. This matches MemSDNode's
    new alignment behavior, and holds more interesting information.

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

commit 47b5330a18b00883f10807c53120a57127cc0703
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 21 18:32:20 2009 +0000

    Add a comment mentioning the rdar number associated with this test.

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

commit 51dbce6a853d1b2bc8084b18e741a666e7c83548
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 21 18:30:38 2009 +0000

    Add support for rematerializing FsFLD0SS and FsFLD0SD as constant-pool
    loads in order to reduce register pressure.

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

commit 1948855617427c57a974e270f9fb21fb20b46420
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 21 18:03:22 2009 +0000

    Recognize SSE min and max opportunities in even more cases.
    And fix a bug with the behavior of min/max instructions formed from
    fcmp uge comparisons.

    Also, use FiniteOnlyFPMath() for this code instead of UnsafeFPMath,
    as it is more specific.

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

commit e57ba8991a2b71698d70928e66b8baff012b163c
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 21 17:58:09 2009 +0000

    Fix the offset values for these memoperands. For frame objects, the
    PseudoSourceValue already effectively represents the offset from the
    frame base, so the actual offset should not be added to it.

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

commit 1846fa00f3590637b7d8dbfc0f5c2254bd42436f
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 17:55:47 2009 +0000

    big endian systems shift by bits too, hopefully this will fix the ppc
    bootstrap problems.

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

commit 55a622f7da7cdbc88190bb100cafd60127abf0ec
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 21 17:54:42 2009 +0000

    Nick pointed out that DominanceFrontier and DominanceTree are preserved
    by setPreservesCFG().

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

commit b350b3d81e6b7df211447f0bc54b4493af9aa444
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 21 17:53:35 2009 +0000

    Remove the special-case for constants in PHI nodes; it's not really
    helpful, and it didn't correctly handle the case of constants input
    to PHIs for backedges.

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

commit 012b360d60c62c975af276d9a04fcfd79cf3ac9c
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 17:24:04 2009 +0000

    fix PR5016, a crash I introduced in GVN handing first class
    arrays and structs, which cannot be bitcast to integers.

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

commit 8435ab1c698f403ef565764e458c7dceb70b0495
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Mon Sep 21 15:53:44 2009 +0000

    Use raw_ostream::indent instead of passing strings.

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

commit 30a8d480ddd031f85b3386db7ccfe11e027b525c
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 21 15:18:33 2009 +0000

    Fix this assertion string to mention subreg_to_reg.

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

commit 56b9fc1caef68a302d561472c1691ded886efd56
Author: Nuno Lopes <nunoplopes@sapo.pt>
Date:   Mon Sep 21 14:11:56 2009 +0000

    initialize SymbolsCanStartWithDigit to false by default

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

commit ce08ae8748979ca3ca4a0048ebc610602a76bedc
Author: Xerxes Ranby <xerxes@zafena.se>
Date:   Mon Sep 21 08:08:29 2009 +0000

    Update cmake.

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

commit 8314a42c92bd21ecfa700da8cbe60b6818caba33
Author: Jakob Stoklund Olesen <stoklund@2pi.dk>
Date:   Mon Sep 21 07:19:08 2009 +0000

    Verify that phi instructions refer to MBBs in the CFG.

    The machine code verifier no longer tolerates phi instructions with noop
    operands. All MBBs on a phi instruction must be in the CFG.

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

commit aae7fcb7114258c6d289601bf0d68a25aeabf5d5
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 06:48:08 2009 +0000

    enable non-local analysis and PRE of large store -> little load.
    This doesn't kick in too much because of phi translation issues,
    but this can be resolved in the future.

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

commit 19b84b380a7341297af6636f8e58373046be7d4b
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 06:30:24 2009 +0000

    convert an std::pair to an explicit struct.

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

commit 8f91208a30c55c3619cc1ffd1abc1ca41a2ac556
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 06:24:16 2009 +0000

    move some functions, add a comment.

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

commit 41eb59cc4d3718b4c640a3746b31f5253dcca243
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 06:22:46 2009 +0000

    split HandleLoadFromClobberingStore in two pieces: one that does the
    analysis, one that does the xform.

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

commit c62f2aa0f8d92120fa45a27b97301b173b092ac4
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 06:04:07 2009 +0000

    add a note

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

commit 98cb5536ab1aa5667bb5b602bf691631f3bbaffc
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 21 05:58:35 2009 +0000

    Register the MachineModuleInfo for the ARM JIT, and update JITDwarfEmitter to
    assert if the setModuleInfo hasn't been called.

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

commit 7932c5775e79a332b5cb036e71995d4738eb7fe9
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 05:57:47 2009 +0000

    add pr#

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

commit 0907b520a0b293e15a6296de4c37d0a44b40306d
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 05:57:11 2009 +0000

    Improve GVN to be able to forward substitute a small load
    from a piece of a large store when both are in the same block.

    This allows clang to compile the testcase in PR4216 to this code:

    _test_bitfield:
    	movl	4(%esp), %eax
    	movl	%eax, %ecx
    	andl	$-65536, %ecx
    	orl	$32962, %eax
    	andl	$40186, %eax
    	orl	%ecx, %eax
    	ret

    This is not ideal, but is a whole lot better than the code produced
    by llvm-gcc:

    _test_bitfield:
    	movw	$-32574, %ax
    	orw	4(%esp), %ax
    	andw	$-25350, %ax
    	movw	%ax, 4(%esp)
    	movw	7(%esp), %cx
    	shlw	$8, %cx
    	movzbl	6(%esp), %edx
    	orw	%cx, %dx
    	movzwl	%dx, %ecx
    	shll	$16, %ecx
    	movzwl	%ax, %eax
    	orl	%ecx, %eax
    	ret

    and dramatically better than that produced by gcc 4.2:

    _test_bitfield:
    	pushl	%ebx
    	call	L3
    "L00000000001$pb":
    L3:
    	popl	%ebx
    	movl	8(%esp), %eax
    	leal	0(,%eax,4), %edx
    	sarb	$7, %dl
    	movl	%eax, %ecx
    	andl	$7168, %ecx
    	andl	$-7201, %ebx
    	movzbl	%dl, %edx
    	andl	$1, %edx
    	sall	$5, %edx
    	orl	%ecx, %ebx
    	orl	%edx, %ebx
    	andl	$24, %eax
    	andl	$-58336, %ebx
    	orl	%eax, %ebx
    	orl	$32962, %ebx
    	movl	%ebx, %eax
    	popl	%ebx
    	ret

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

commit 5c3fd1da0082f74a5e7cb3b6b5501a67bf0097bf
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 05:52:45 2009 +0000

    add a helper method.

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

commit a32393f6bbe778ea5f6960bc67c34176ce769198
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Mon Sep 21 04:32:32 2009 +0000

    Fix PR4986. "r1024 = insert_subreg r1024, undef, 2" cannot be turned in an implicit_def. Instead, it's an identity copy so it should be eliminated. Also make sure to update livevariable kill information.

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

commit bd66f1607e2c9e866c66fdb4b1feb9a15718075b
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 21 03:56:00 2009 +0000

    Don't allow formatted_ostream to be unbuffered, even if its underlying buffer
    is.
     - The problem is that formatted_ostream forces its underlying buffer to be
       unbuffered, so if some client happens to wrap a formatted_ostream around
       something, but still use the underlying stream, then we can end up writing on
       a fully unbuffered output (which was never intended to be unbuffered).

     - This makes clang (and presumably llvm-gcc) -emit-llvm -S a mere 10x faster.

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

commit 51481994a6a57871da58724cd6b9aa249833c4f8
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 02:53:57 2009 +0000

    one case handled, expanded another testcase inline.

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

commit ff36c95843e4cc7402357d937d848e729d022ff6
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 02:42:51 2009 +0000

    formatting cleanups, no functionality change.

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

commit 3453185664bae401dc32f9c8744c0fa9590f9716
Author: Reid Kleckner <reid@kleckner.net>
Date:   Mon Sep 21 02:34:59 2009 +0000

    Add documentation on how to use enable debug information in the JIT and use it with GDB.

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

commit ec3c4b93ee43cac3749ade851f57a1863de06eb5
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 21 02:30:42 2009 +0000

    fix a FileCheck bug where:

    ; CHECK: foo
    ; CHECK-NOT: foo
    ; CHECK: bar

    would always fail.

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

commit 096f10a51b037861069e280020dd2967fdce6b6e
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 21 00:05:30 2009 +0000

    Move ARM and X86 specific AsmParser tests into separate subdirectories, and only
    run if appropriate target is supported.

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

commit 738b4f2a7d37600af45fc6a5515d5a5be175d19e
Author: Reid Kleckner <reid@kleckner.net>
Date:   Sun Sep 20 23:52:43 2009 +0000

    Implement the JIT side of the GDB JIT debugging interface.  To enable this
    feature, either build the JIT in debug mode to enable it by default or pass
    -jit-emit-debug to lli.

    Right now, the only debug information that this communicates to GDB is call
    frame information, since it's already being generated to support exceptions in
    the JIT.  Eventually, when DWARF generation isn't tied so tightly to AsmPrinter,
    it will be easy to push that information to GDB through this interface.

    Here's a step-by-step breakdown of how the feature works:

    - The JIT generates the machine code and DWARF call frame info
      (.eh_frame/.debug_frame) for a function into memory.
    - The JIT copies that info into an in-memory ELF file with a symbol for the
      function.
    - The JIT creates a code entry pointing to the ELF buffer and adds it to a
      linked list hanging off of a global descriptor at a special symbol that GDB
      knows about.
    - The JIT calls a function marked noinline that GDB knows about and has put an
      internal breakpoint in.
    - GDB catches the breakpoint and reads the global descriptor to look for new
      code.
    - When sees there is new code, it reads the ELF from the inferior's memory and
      adds it to itself as an object file.
    - The JIT continues, and the next time we stop the program, we are able to
      produce a proper backtrace.

    Consider running the following program through the JIT:

    #include <stdio.h>
    void baz(short z) {
      long w = z + 1;
      printf("%d, %x\n", w, *((int*)NULL));  // SEGFAULT here
    }
    void bar(short y) {
      int z = y + 1;
      baz(z);
    }
    void foo(char x) {
      short y = x + 1;
      bar(y);
    }
    int main(int argc, char** argv) {
      char x = 1;
      foo(x);
    }

    Here is a backtrace before this patch:
    Program received signal SIGSEGV, Segmentation fault.
    [Switching to Thread 0x2aaaabdfbd10 (LWP 25476)]
    0x00002aaaabe7d1a8 in ?? ()
    (gdb) bt
    #0  0x00002aaaabe7d1a8 in ?? ()
    #1  0x0000000000000003 in ?? ()
    #2  0x0000000000000004 in ?? ()
    #3  0x00032aaaabe7cfd0 in ?? ()
    #4  0x00002aaaabe7d12c in ?? ()
    #5  0x00022aaa00000003 in ?? ()
    #6  0x00002aaaabe7d0aa in ?? ()
    #7  0x01000002abe7cff0 in ?? ()
    #8  0x00002aaaabe7d02c in ?? ()
    #9  0x0100000000000001 in ?? ()
    #10 0x00000000014388e0 in ?? ()
    #11 0x00007fff00000001 in ?? ()
    #12 0x0000000000b870a2 in llvm::JIT::runFunction (this=0x1405b70,
    F=0x14024e0, ArgValues=@0x7fffffffe050)
       at /home/rnk/llvm-gdb/lib/ExecutionEngine/JIT/JIT.cpp:395
    #13 0x0000000000baa4c5 in llvm::ExecutionEngine::runFunctionAsMain
    (this=0x1405b70, Fn=0x14024e0, argv=@0x13f06f8, envp=0x7fffffffe3b0)
       at /home/rnk/llvm-gdb/lib/ExecutionEngine/ExecutionEngine.cpp:377
    #14 0x00000000007ebd52 in main (argc=2, argv=0x7fffffffe398,
    envp=0x7fffffffe3b0) at /home/rnk/llvm-gdb/tools/lli/lli.cpp:208

    And a backtrace after this patch:
    Program received signal SIGSEGV, Segmentation fault.
    0x00002aaaabe7d1a8 in baz ()
    (gdb) bt
    #0  0x00002aaaabe7d1a8 in baz ()
    #1  0x00002aaaabe7d12c in bar ()
    #2  0x00002aaaabe7d0aa in foo ()
    #3  0x00002aaaabe7d02c in main ()
    #4  0x0000000000b870a2 in llvm::JIT::runFunction (this=0x1405b70,
    F=0x14024e0, ArgValues=...)
       at /home/rnk/llvm-gdb/lib/ExecutionEngine/JIT/JIT.cpp:395
    #5  0x0000000000baa4c5 in llvm::ExecutionEngine::runFunctionAsMain
    (this=0x1405b70, Fn=0x14024e0, argv=..., envp=0x7fffffffe3c0)
       at /home/rnk/llvm-gdb/lib/ExecutionEngine/ExecutionEngine.cpp:377
    #6  0x00000000007ebd52 in main (argc=2, argv=0x7fffffffe3a8,
    envp=0x7fffffffe3c0) at /home/rnk/llvm-gdb/tools/lli/lli.cpp:208

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

commit 11c06f4536a6ced3db546b5c7b07ff75047a302c
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 20 23:30:31 2009 +0000

    Work around a FileCheck bug, for now.

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

commit bc1c1435324c8b816a1174dd8b6b177f420d6ba8
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:56:43 2009 +0000

    simplify as daniel suggests

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

commit a094468e10fe4f091e7d907293becbdcfbd6427e
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:54:26 2009 +0000

    write rfind in terms of npos as daniel requested

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

commit 637012fa510c7edf6b964a351eb3f265ed799674
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:46:42 2009 +0000

    remove a dead method.

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

commit 3472feab21a77560d266b6ff1a24c5e56a99fb42
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:45:18 2009 +0000

    grammaro

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

commit c911446f73dd4b9d08d33002826f4abb660c8f0a
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:44:26 2009 +0000

    Revert r82404, it is causing a bootstrap miscompile.  This is very very
    scary, as it indicates a lurking bug. yay.

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

commit 01467f6f77e9ac0cf6529a6859557def9b7a8c89
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:42:44 2009 +0000

    rewrite CountNumNewlinesBetween to be in terms of StringRef.

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

commit 873602b157d1fbdf0c325f03ec7d1845536286e9
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:36:11 2009 +0000

    this was not supposed to be committed

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

commit 0d82c7077aaeb545a95fc782af1d742ea4a76016
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:35:26 2009 +0000

    implement and document support for CHECK-NOT

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

commit 7f850d129178bcf88a47450425f40adac1ed1dbb
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 22:11:44 2009 +0000

    rewrite FileCheck in terms of StringRef instead of manual pointer pairs.

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

commit f1e45469b47ce54ae561ac4e1ab5369e5c5d73ec
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 21:00:18 2009 +0000

    improve memdep to eliminate bitcasts (and aliases, and noop geps)
    early for the stated reasons: this allows it to find more
    equivalences and depend less on code layout.

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

commit d6b1d05df6e52b543bc7a580ae50876b1c75e1ba
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 20:09:34 2009 +0000

    Move CoerceAvailableValueToLoadType earlier in GVN.cpp.  Hook it up
    so that nonlocal and partially redundant loads can use it as well.
    The testcase shows examples of craziness this can handle.  This triggers
    *many* times in 176.gcc.

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

commit 3de5c8cdc9d2dbeb463861ec0754ba9d22f3e821
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 19:31:14 2009 +0000

    change the interface to CoerceAvailableValueToLoadType to be
    more generic.

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

commit a266ec3f6128ce246bc5616f23810d74d7189676
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 20 19:04:28 2009 +0000

    Teach 'make check-all' to build the site configuration for clang, if it is in tree.

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

commit 7741aa5bd6c283df1435bc6c140ebc5dac40327c
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 19:03:47 2009 +0000

    enhance GVN to forward substitute a stored value to a load
    (and load -> load) when the base pointers must alias but when
    they are different types.  This occurs very very frequently in
    176.gcc and other code that uses bitfields a lot.

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

commit 7acce9445f10d7ddea1480a477473ce0ca92a1b0
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 17:37:38 2009 +0000

    update an entry, delete an entry which has been fixed.

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

commit 9c220f60be3a50de7fd2a5c491ccfa63c5d3a342
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 17:32:21 2009 +0000

    tidy up

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

commit dac97dab11fffaae623be1d4bd2a0c2e249a5c54
Author: Bill Wendling <isanbard@gmail.com>
Date:   Sun Sep 20 09:13:15 2009 +0000

    --- Reverse-merging r82282 into '.':
    U    lib/CodeGen/AsmPrinter/DwarfException.cpp
    U    lib/CodeGen/AsmPrinter/DwarfException.h

    --- Reverse-merging r82274 into '.':
    U    lib/Target/TargetLoweringObjectFile.cpp
    G    lib/CodeGen/AsmPrinter/DwarfException.cpp

    These revisions were breaking everything.

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

commit f0544b677b4974c107db08d19d419ce3a5703478
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:47:59 2009 +0000

    remove a temporary hack.

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

commit bf4b6a8e534c6934d3f702cb8d15e727096aabfb
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:41:30 2009 +0000

    rename X86ATTAsmPrinter.cpp -> X86AsmPrinter.cpp likewise the .h file.

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

commit c8ef9fecee83d80f51ef84e4ccfb1aff73d965c4
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:39:06 2009 +0000

    move target registry stuff to X86ATTAsmPrinter.cpp

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

commit 937948b3621332a2bbd8b1ca414fbb04b89e65a8
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:37:51 2009 +0000

    simplify this now that createX86CodePrinterPass is trivial

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

commit 477b9ac19d813b317e3b90ebfdffa1953d4e1261
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:35:34 2009 +0000

    rename X86ATTAsmPrinter class -> X86AsmPrinter

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

commit 2aa10dafe6b2eeccc73dda8817d0eebce9481c63
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:32:00 2009 +0000

    remove the asmstring, it is now dead.  Improve comment.

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

commit 5086a10b582cf8d9f0f1ac4d7569c24d260092c8
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 07:31:25 2009 +0000

    Peer through zext and sext to eliminate them when it is safe to do so.

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

commit a7e959d869e698bf1b8d22044d96655632f6072e
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:28:26 2009 +0000

    kill off printPICLabel now, it's specialness is handled by
    the MachineInstr ->MCInst lowering process, not in the
    asmprinter.

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

commit 548587879c1ca975c31cfa7a2e93d2778270d8ce
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:25:17 2009 +0000

    delete X86IntelAsmPrinter!  Now -x86-asm-syntax just switches
    the instruction syntax, not the entire asmprinter.

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

commit cfef6a6a359626560bb9ce090df8895dbc898b00
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 07:21:39 2009 +0000

    Fold 'icmp eq (icmp), true' into an xor(icmp).

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

commit d6153b455d4f5ef8514356fbfbbeae0f2281ad77
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:17:49 2009 +0000

    Add an intel syntax MCInstPrinter implementation.  You can now
    transcode from AT&T to intel syntax with "llvm-mc foo.s -output-asm-variant=1"

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

commit a77caae2f50e84a6e1b6e084709806b65680b005
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 07:16:54 2009 +0000

    tidy up

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

commit 241fa24501d56a9fc02373cb38d1ef53cc155bef
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 07:00:24 2009 +0000

    Rewrite this check so that it checks what it's supposed to and doesn't use
    CHECK-NOT.

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

commit fc71ac06870a72ae5c040e28f30c8064db85af48
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 06:58:54 2009 +0000

    eliminate a use of strtoul.

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

commit 14267fcd04c922b6c52d7b9bb474479e5bf57889
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 06:45:52 2009 +0000

    split random COFF asmprinter state out to X86COFFMachineModuleInfo.h.
    Make dllexport directives come out in determinstic order.

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

commit 81f952d11efbfddff01ceacd0a1a98d11b6aaeb5
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 06:27:35 2009 +0000

    Correct the comment; this applies to fcmp too.

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

commit dbcffe8712043251db8648cfa350b2f1e09084e9
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 06:26:34 2009 +0000

    Remove tab, again.

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

commit c9c524ea42f9ed437369879c709b95f24bd3a4e8
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 06:24:51 2009 +0000

    Teach the constant folder how to not a cmpinst.

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

commit e4a6ac9ba8cd5339cb954d9830b1d2a06223355b
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 06:21:43 2009 +0000

    smallvectorize getExtraOptionNames

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

commit 53f949e7a0b5841e5a497c3015709551729d7874
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 06:21:20 2009 +0000

    add a helper method.

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

commit 3d211b2bfbab124d05ce785a55bc3af0d067faf2
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 06:18:38 2009 +0000

    minor cleanups.

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

commit 5b6816d9f3b0fc2e47a458e07d63586aaaf8718f
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 20 06:17:21 2009 +0000

    Add 'make check-all', which runs the LLVM tests along with the clang tests if
    its in the standard location.

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

commit 681869cb3d72675bb06147c36d9fb31fe8f1ad2e
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 20 06:17:12 2009 +0000

    Follow googletest logic for suppressing warnings in unittests/UnitTestMain.

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

commit 8748d237cb2b4ae277921ccc08e54ad742745a6a
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:53:47 2009 +0000

    strength reduce further StringRef-> const char*, saving another 620 bytes.

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

commit b4f150b44b10efd07b2a88484830602476bd8d7a
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 05:48:50 2009 +0000

    Try turning icmp(bitcast(x), bitcast(y)) into icmp(bitcast(bitcast(x)), y) in
    the hopes that the two bitcasts will merge.

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

commit a81653676cd5fc5e695af54399394225e8d89b79
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:48:01 2009 +0000

    switch an std::string to StringRef, shaving 400 bytes off CommandLine.o

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

commit bd2115c7b222e57eda27fa44dc982fee783c338d
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 05:47:45 2009 +0000

    Remove tabs I added.

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

commit 0d9aff4829c7463923e2bb17aa34207cca892513
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:37:24 2009 +0000

    the switch from std::map -> StringMap caused --help output to be in
    non-sorted order, restore the sort.

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

commit c8240964bf2a87365923de9c21a98f84a29320bd
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:22:52 2009 +0000

    eliminate the duplicate detection loop, moving it into the loop that populates the Opts vector in the first place.

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

commit 34bbc24fd05e08cb98ee66991995363c89fc9bd1
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:18:28 2009 +0000

    Eliminate a masochistic "algorithm" loop, shrinking CommandLine.o from 71524->70700 bytes.

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

commit ab754915527a90d5eb8a702cf656048f3e70d28d
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:15:12 2009 +0000

    don't use count + insert, just do insert + failure.  Also, instead of deleting from
    the middle of a vector, swap the last element in and pop_back.  Also saves 330 bytes :)

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

commit 97be18f541d7a7ddfc824f9318091edca672798f
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:12:14 2009 +0000

    switch to SmallPtrSet instead of std::set, saving 1K from the
    release-asserts .o file (72900->71856).

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

commit 78f024be77b8f3ded896be562c20f60aaea019e2
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:06:23 2009 +0000

    change an std::sort to an array_pod_sort call, shrinking CommandLine.o by 9%.

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

commit d516d025a30f0e54aaf4a36bd56cbc992d6888a6
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 05:03:30 2009 +0000

    Several changes together in a murky mess:
    1. Change some "\n" -> '\n'.
    2. eliminte some std::string's by using raw_ostream::indent.
    3. move a bunch of code out of the main arg parser routine into
       a new static HandlePrefixedOrGroupedOption function.
    4. Greatly simplify the implementation of getOptionPred, and make
       it avoid splitting prefix options at = when that doesn't match
       a non-prefix option.

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

commit 4de9f27fca2cc69c8313f1d2dfb06a92623c78b1
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 04:27:06 2009 +0000

    Clean up the usage of evaluateICmpRelation's return value.
    Add another line to the ConstantExprFold test to demonstrate the GEPs may not
    wrap around in either the signed or unsigned senses.

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

commit a0a39c32b9db28f69a32be709fdfba69d7d00603
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 20 04:03:41 2009 +0000

    Fix refacto, this code was expecting to stride past the argument prefix.

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

commit 43e136586bbd27519d726aec7d6b8234117ea3c7
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 20 04:03:34 2009 +0000

    Strip trailing whitespace.

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

commit 90cc3b72cd886acc682e2a287b5b43638f723e28
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 20 04:03:25 2009 +0000

    A few more tabs -> spaces.

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

commit 7f7a3db50c589b634e884b5d1b2f426bc49afcd3
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 03:48:46 2009 +0000

    Remove dead store by taking a guess at what Chris meant. I wasn't able to
    design a testcase that would tickle this behaviour.

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

commit 9286265a3ee87750212828f753e362bc4b5ffa56
Author: Bill Wendling <isanbard@gmail.com>
Date:   Sun Sep 20 02:27:06 2009 +0000

    Still one more thing wrong here...

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

commit 3be44e69724c80460d2ef5abab22d802f78615cc
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 20 02:20:51 2009 +0000

    Tabs -> spaces, and remove trailing whitespace.

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

commit ab2f66670c4c8ecc8e62d989f9d9d9c6f62dc07b
Author: Bill Wendling <isanbard@gmail.com>
Date:   Sun Sep 20 02:19:49 2009 +0000

    Here's fun! It turns out that these filter functions can be internal. If they're
    internal, they shouldn't use the indirect pointer stuff. In the case of
    throw_rethrow_test, it was marked as 'internal' and calculated its own offset to
    its contents.

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

commit 216b5548a9287b2e8e3fd20594c20049ff9248ec
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 02:11:47 2009 +0000

    Delete dead code. sext and zext can not turn integers into pointers. Further,
    the optimization described in the comment is only valid with target data.

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

commit 0a5bcfcc0e41b0ef8933b974d1ec46665c19fcc4
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 02:02:24 2009 +0000

    convert argname to StringRef, simplifying LookupOption.

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

commit d8168dd1312860814da3181fecb491b4c5500ba1
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 01:53:12 2009 +0000

    convert 'Value' to StringRef which makes it easier to
    maintain the "null is unspecified, empty is empty" semantics.

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

commit 4627c688f7ab3c7951640cc658208826b32c63bd
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 01:49:31 2009 +0000

    Change CommaSeparated processing to do it with StringRef instead of temporary std::strings.
    This requires StringRef'izing ProvideOption which I also did.

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

commit 3c7fc6353a4de5b87d9c22c5714818dfb8f8bf45
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 01:35:59 2009 +0000

    Value* were never meant to be const. Removing constness from the constant
    folder removes a lot of const_casting and requires no changes to clang or
    llvm-gcc.

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

commit 17e5709887260f988fe94076ef18d967e0c6ade7
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 01:33:46 2009 +0000

    rewrite ParseCStringVector in terms of stringref.

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

commit fadd584b7df635545dcd4bb33a3c64adbdad46e0
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 01:22:16 2009 +0000

    move a couple non-trivial methods out of line, add new
    find_first_of/find_first_of methods.

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

commit 2ee921e886c157a1e6206867240c4314b5db5af7
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 01:11:23 2009 +0000

    coding style cleanup

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

commit 157229d5138579232650753d0514025858b01f8e
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 00:40:49 2009 +0000

    convert a bunch more stuff to use StringRef.  The ArgName arguments are now
    stringref because they may not be nul terminated.  For options like -Lfoo
    this now avoids a O(n)  temporary std::strings where N is the length of
    the string after -L.

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

commit 2f3b90b1b3b99b963b60b9ed53a67e09c202260f
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 00:38:28 2009 +0000

    add size_t and a version of rfind that allows specification of where
    to scan from.

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

commit 13c4b63b5151f9f9c434341c2ea43f4f34c2243b
Author: Dale Johannesen <dalej@apple.com>
Date:   Sun Sep 20 00:36:41 2009 +0000

    When computing live intervals for earlyclobber operands,
    we pushed the beginning of the interval back 1, so the
    interval would overlap with inputs that die.  We were
    also pushing the end of the interval back 1, though,
    which means the earlyclobber didn't overlap with other
    output operands.  Don't do this.  PR 4964.

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

commit 747e01e815ec69962736f851866adbe28a27d8c8
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 20 00:07:40 2009 +0000

    avoid a bunch of malloc thrashing for PositinoalVals by eliminating
    a std::vector and a bunch of std::string temporaries.

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

commit 1f40f38b05cb2662351d1a917ecb5f830a0dba83
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 20 00:04:02 2009 +0000

    Teach the constant folder how to handle a few simple i1 cases.

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

commit 717f77390b5d4bcbddecc414ce46a23abf684c01
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 19 23:59:02 2009 +0000

    Avoid some temporary strings.

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

commit 60b7363a854bd53c30e474836e3a1e04ac2dc163
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 19 23:58:48 2009 +0000

    add some more overloads of StringRef::getAsInteger for
    common and useful integer types.

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

commit d867fb4396c8affcdb680108b43cb110b7d12db8
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 19 23:57:31 2009 +0000

    add a simple c_str() method to SmallString.

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

commit a741cb48d356de1e0b27a212385e85fd521755b4
Author: Bill Wendling <isanbard@gmail.com>
Date:   Sat Sep 19 22:02:37 2009 +0000

    Revert r82274. It's causing failures in the CINT2006 benchmarks.

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

commit 5d62cb53f5055c4d43709228c30a2febc6495f48
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 19 20:40:28 2009 +0000

    Prefer super class constructor to explicit initialization.

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

commit d36c7729ae080ee3721891794d3617080ddaf550
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 19 20:40:21 2009 +0000

    Tabs -> spaces (really?)

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

commit 19f1d447f73de5807acb64281df5d7acaa23ceeb
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 19 20:40:14 2009 +0000

    Fix indentation.

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

commit 41716328c597656692f2189f47c7cc56120d2aa5
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 19 20:40:05 2009 +0000

    Strip trailing whitespace.

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

commit 80b13b31a80b54768abc2da9f00a725209702816
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 19 20:39:50 2009 +0000

    RHS of assignment should be const reference.

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

commit 9229fdb0d591d22ad962dfb97d98d12ef56b5833
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sat Sep 19 20:30:26 2009 +0000

    Remove the default value for ConstantStruct::get's isPacked parameter and
    update the code which was broken by this.

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

commit b2f35c54ff2c2ef8e03583a0bed0e15bd38426c1
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 19 19:47:14 2009 +0000

    provide a "strtoull" operation that works on StringRef's.

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

commit 4a5c6fab5776ded60bc45c264f5f22053062678b
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sat Sep 19 19:00:06 2009 +0000

    Add a comment explaining why you would ever want to do this.

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

commit 47d05cbb759287986bb6223325b987caeda53a6e
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 19 18:55:05 2009 +0000

    convert a bunch of std::strings to use StringRef.  This should eliminate
    a massive number of temporary strings created when parsing a command line.
    More still left to eliminate.

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

commit 4980177e93ff0c3d02a6fa98a5c91e4b168d6c0c
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sat Sep 19 18:33:36 2009 +0000

    Lett users of sparse propagation do their own thing with phi nodes if they want
    to. This can be combined with LCSSA or SSI form to store more information on a
    PHINode than can be computed by looking at its incoming values.

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

commit d899f5970f3e1437cff128a7cf3331a8bcf599b9
Author: Duncan Sands <baldrick@free.fr>
Date:   Sat Sep 19 11:25:44 2009 +0000

    The flag "--dot-cfg-only" is at the moment equivalent to the flag "--dot-cfg".
    It prints the content of all bbs, instead of printing empty bbs to make the
    CFG more readable.  Fix this.  Patch by Tobias Grosser.

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

commit bb57eefc4bd33cf3e83b2fb56a6b4fd7f4825bfa
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 19 10:09:15 2009 +0000

    Fix funky comments.

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

commit 4ae44e1230cc009186e73112ff34c4092dd5dafd
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 19 10:08:51 2009 +0000

    Update comments.

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

commit 48086603b0774317c5e35a38627e1c811c09f669
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Sat Sep 19 10:01:45 2009 +0000

    Try to speed up the slowest parts of the CommandLine library

    - Replace std::map<std::string with StringMap
    - Eliminate unnecessary std::string copies
    - ~10% speed-up for clang's testsuite on my machine (debug build)

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

commit 5f3a54090af5d61d35de2158542ff76fc9ef053f
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 19 09:51:03 2009 +0000

    Fix PR4926. When target hook EmitInstrWithCustomInserter() insert new basic blocks and update CFG, it should also inform sdisel of the changes so the phi source operands will come from the right basic blocks.

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

commit 48c3c54ceb1fbdcddac9f11a11163a44efe21f55
Author: Victor Hernandez <vhernandez@apple.com>
Date:   Fri Sep 18 22:35:49 2009 +0000

    Enhance transform passes so that they apply the same tranforms to malloc calls as to MallocInst.

    Reviewed by Dan Gohman.

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

commit 627f280adfd69bbf8e859de69b6807ae0c9effce
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 18 22:03:29 2009 +0000

    remove an extraneous mem2reg pass early in the pipe.  Since
    this is run after the 'standard function passes', SRoA was
    recently run.  This saves a domfrontier construction. Thanks
    to Eli for noticing this.

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

commit b215f0dab024efb9d46497a28404bcde2638e1a3
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 18 22:01:30 2009 +0000

    reduce indentation by using an early exit, and add a comment,
    no functionality change.

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

commit 1d8662c4dfa69ff87d42037794cf6e6774c2c512
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Fri Sep 18 21:43:11 2009 +0000

    Fix a comment typo and some whitespace.

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

commit 764ce99aff6b5db12d99c31467c9e9b7c5612cf2
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Fri Sep 18 21:42:44 2009 +0000

    Fix a typo in an assertion message.

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

commit 98c415caf6f8e0eac9b9247fb782d6718430e288
Author: Bill Wendling <isanbard@gmail.com>
Date:   Fri Sep 18 21:37:56 2009 +0000

    Factor out label difference creation.

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

commit 82f0ab64c43dcae28ed4f0cb4b8bb69df0b4561d
Author: Victor Hernandez <vhernandez@apple.com>
Date:   Fri Sep 18 21:34:51 2009 +0000

    Enhance analysis passes so that they apply the same analysis to malloc calls as to MallocInst.

    Reviewed by Eli Friedman.

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

commit 3c5ec3c11bd3283bfd8bbf7ce12bb81b8d3e3ed0
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 18 21:23:12 2009 +0000

    Delete the label names from this test to make it less fragile.

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

commit 8c065b334c41ba54d98ad45a6c5b4fdd60c06d2c
Author: Bill Wendling <isanbard@gmail.com>
Date:   Fri Sep 18 21:14:36 2009 +0000

    It's inefficient to have place the exception tables (which contain the LSDA)
    into the __DATA section. At launch time, dyld has to update most of the section
    to fix up the type info pointers. It's better to place it into the __TEXT
    section and use pc-rel indirect pointer encodings. Similar to the personality
    routine.

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

commit d7dc983029cf293dd67637c27b92c04c0baf968b
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 18 21:02:19 2009 +0000

    Enhance EmitInstrWithCustomInserter() so target can specify CFG changes that sdisel will use to properly complete phi nodes.
    Not functionality change yet.

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

commit 8cd2ec566b2bbfa3e07458bc0050af859676fcd4
Author: Shantonu Sen <ssen@apple.com>
Date:   Fri Sep 18 20:35:59 2009 +0000

    Fix cmake build, which has a different -I that
    causes the "../foo" to not find the file

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

commit f283fb255f535d56d8cd5f86058ccf2359800e86
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 18 20:22:52 2009 +0000

    Make a new X8632_MachoTargetObjectFile TLOF implementation whose
    getSymbolForDwarfGlobalReference is smart enough to know that it
    needs to register the stub it references with MachineModuleInfoMachO,
    so that it gets emitted at the end of the file.

    Move stub emission from X86ATTAsmPrinter::doFinalization to the
    new X86ATTAsmPrinter::EmitEndOfAsmFile asmprinter hook.  The important
    thing here is that EmitEndOfAsmFile is called *after* the ehframes are
    emitted, so we get all the stubs.

    This allows us to remove a gross hack from the asmprinter where it would
    "just know" that it needed to output stubs for personality functions.
    Now this is all driven from a consistent interface.

    The testcase change is just reordering the expected output now that the
    stubs come out after the ehframe instead of before.

    This also unblocks other changes that Bill wants to make.

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

commit b611307c9730ae90448fcacfd8ee9d0d208cc3ee
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 18 20:17:03 2009 +0000

    add a new hook to allow targets to splat stuff at the end of the file.
    Overriding doFinalization is pretty lame.

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

commit 899369d4ad9633b3fcf4aba63dc411ce1988ad75
Author: Dale Johannesen <dalej@apple.com>
Date:   Fri Sep 18 20:15:22 2009 +0000

    Model the carry bit on ppc32.  Without this we could
    move a SUBFC (etc.) below the SUBFE (etc.) that consumed
    the carry bit.  Add missing ADDIC8, noticed along the way.

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

commit 12e03298135939c9d40f25f5f762d9522ca352c2
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 18 19:59:53 2009 +0000

    Add support for using the FLAGS result of or, xor, and and instructions
    on x86, to avoid explicit test instructions. A few existing tests changed
    due to arbitrary register allocation differences.

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

commit 3c8eecdb5aaa4e078ffa0a058219a54dbee98274
Author: Sean Callanan <scallanan@apple.com>
Date:   Fri Sep 18 19:35:23 2009 +0000

    Added RCL and RCR (rotate left and right with a
    carry bit) instructions to the Intel instruction
    tables.

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

commit adc37616a0ed90c8d25360168e395653b8ad9bd5
Author: Devang Patel <dpatel@apple.com>
Date:   Fri Sep 18 19:26:43 2009 +0000

    Write and read metadata attachments.

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

commit 811ebe0ef3c476c5cbf04d6c2bf362f56a650eec
Author: Victor Hernandez <vhernandez@apple.com>
Date:   Fri Sep 18 19:20:02 2009 +0000

    Update malloc call creation code (AllocType is now the element type of the malloc, not the resulting type).

    In getMallocArraySize(), fix bug in the case that array size is the product of 2 constants.

    Extend isArrayMalloc() and getMallocArraySize() to handle case where malloc is used as char array.

    Ensure that ArraySize in LowerAllocations::runOnBasicBlock() is correct type.

    Extend Instruction::isSafeToSpeculativelyExecute() to handle malloc calls.

    Add verification for malloc calls.

    Reviewed by Dan Gohman.

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

commit 600abb363005c6b5abc9385b35c37720cb2eacbf
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 18 18:34:29 2009 +0000

    duncan points out the EH selector values are signed.

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

commit 02897795c891a7e250d03153f391851189fb8f5b
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 18 18:31:37 2009 +0000

    convert some stuff to StringRef to avoid temporary std::strings.

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

commit e5c11a87071a6afaac5df49fb5e552de1d2e5a9a
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 18 18:10:19 2009 +0000

    add a comment.

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

commit 7e54f154ec3d950827ff8e29f01ca55ae958db0f
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 18 18:08:55 2009 +0000

    This file can need access to the X86 instruction enums when the table exceeds 32-bits.

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

commit 4dc36eb1b47ec2157748668fb71943f59711c909
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 18 17:48:05 2009 +0000

    Fix a few more conversion warnings on 4.0

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

commit d852f4d69c40e8ad68c4eb43c38e82da068414bf
Author: Mike Stump <mrs@apple.com>
Date:   Fri Sep 18 17:10:27 2009 +0000

    Update to latest versions of config.guess and config.sub from
    http://savannah.gnu.org/projects/config

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

commit 3789f872b0ac8f9d22d99696164e04b664af90f6
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Fri Sep 18 16:57:42 2009 +0000

    Allow symbols to start from the digit if target requests it. This allows, e.g. pinning
    variables to specified absolute address. Make use of this feature for MSP430.
    This unbreaks PR4776.

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

commit 052e60d59a4f423089f1f088d0e1e7ac61bd5be7
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Fri Sep 18 16:46:16 2009 +0000

    Stop using alloca.

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

commit 50514c7bab532bd061d9b97bcaf98b5e960653db
Author: Xerxes Ranby <xerxes@zafena.se>
Date:   Fri Sep 18 09:50:00 2009 +0000

    Revert r82214 completely to fix build.

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

commit f3233f2b427e9abfbe1633a91e8e84e7bbb19b43
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 18 08:26:06 2009 +0000

    Revert r82214. It broke 403.gcc on x86_64 / Darwin.

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

commit ac00d566d4070167ca5aa1cb48f83fa55b1535b9
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 18 08:16:04 2009 +0000

    Fix a bug in sdisel switch lowering code. When it updates the phi nodes in switch successor blocks, it can introduce multiple phi operands of the same value from different blocks (and may not be on the predecessor list).

    This can be seen on CodeGen/Generic/2006-09-06-SwitchLowering.ll. But it's not known to cause any real regression (but I have added an assertion for it now).

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

commit 28c17afa6abed7695d7c148253631920458ee226
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Fri Sep 18 07:36:47 2009 +0000

    Add newlines.

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

commit ed2ccedb5acf8e5b7f7932aa87f0b188856b894d
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 17 23:56:41 2009 +0000

    make this testcase check darwin32 also

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

commit f494e5b979e9a6d7f7f6db0d93dc10b4d1caa877
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 17 23:55:12 2009 +0000

    rename test

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

commit b51aa3322dc54cc149250513132c30574b2e003c
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 17 23:54:54 2009 +0000

    tolerate llvm.eh.selector.i64 on 32-bit systems and llvm.eh.selector.i32 on
    64-bit systems.

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

commit 6c5eea69ce28fd4909f68486bb97ad470e989575
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 17 23:54:26 2009 +0000

    convert to filecheck

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

commit ec1d9adb02b80de2a1e4219c271ca2cad2362000
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 17 23:42:06 2009 +0000

    rename file

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

commit 7fbb035781529abc1df7b4e4f6471dd977708e3b
Author: Julien Lerouge <jlerouge@apple.com>
Date:   Thu Sep 17 23:27:10 2009 +0000

    Use __attribute__((__used__)) if GCC >= 3.1 (seems to be the oldest GCC
    supporting this attribute).

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

commit 941264e406202121ddb019dffa5e1084819790c3
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Sep 17 23:05:07 2009 +0000

    A testcase!

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

commit 91c792366e0bc38cb14028cd2068b92104f7db51
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Sep 17 23:04:48 2009 +0000

    Fix parsing of optional metadata for 'load', 'store' and 'alloc' instructions.

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

commit c953c1da67f69a4698a7f5379775000e12599134
Author: John McCall <rjmccall@apple.com>
Date:   Thu Sep 17 20:35:18 2009 +0000

    Fix a few places where PointerIntPair was using PointerLikeTypeTraits<PointerTy>
    instead of the PtrTraits provided.  Allows PointerIntPair to contain a
    PointerUnion safely, as long as the bits add up.

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

commit 0ca4b2cefc8cb9260b1467917e630ed7d7d1f6a2
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 17 20:12:05 2009 +0000

    Add an svn:ignore.

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

commit ee62b0424d8c75617484b2d4a9383565044eb5aa
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 17 18:49:52 2009 +0000

    pass machinemoduleinfo down into getSymbolForDwarfGlobalReference,
    currently unused.

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

commit c20e8bfb90176ee9cd27b027c11a3c8c9c117dd6
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 17 18:05:20 2009 +0000

    Teach ScalarEvolution how to reason about no-wrap flags on loops
    where the induction variable has a non-unit stride, such as {0,+,2}, and
    there are expressions such as {1,+,2} inside the loop formed with
    or or add nsw operators.

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

commit 47472be0fc842626bbc7103ca8c2d724c213d67e
Author: Jim Grosbach <grosbach@apple.com>
Date:   Thu Sep 17 17:57:26 2009 +0000

    grammar

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

commit 961e43f21b9c3565598054313e7b928b7d0bf656
Author: Jim Grosbach <grosbach@apple.com>
Date:   Thu Sep 17 17:55:55 2009 +0000

    grammar

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

commit dca235bfe8e20482ce3ad2a42dcf5897756314f2
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 17 17:46:53 2009 +0000

    Another try at fixing compile warnings on 4.0

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

commit a7af40ce842fb14e42581f038d12e76a969121e8
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Thu Sep 17 14:51:57 2009 +0000

    Initialize HasMetadata to zero.

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

commit 0add5c53c467b953fb803c8c50e450eeb3a42bc9
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 17 06:37:07 2009 +0000

    Remove test cases using -regalloc=simple.

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

commit b21f415e57b24dbb1a962ddab5fd21ebaebc7d0d
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 17 05:48:07 2009 +0000

    Remove simple regalloc. It has bit rotted.

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

commit 1581dc7e9c17c8c7e315d70e0b09e8b56b18f520
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 17 01:08:43 2009 +0000

    add a version of the APFloat constructor that initializes to 0.0

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

commit f7f012381f5d47bb4f8a5a4663311daee8692cbf
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 17 00:57:15 2009 +0000

    Fix PR4910: Broken logic in coalescer means when a physical register liveness is being shortened, the sub-registers were not. The symptom is the register allocator could not find a free register for this particular test.

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

commit 119fdf6a2815d88d5fdfc5ada6897c96c9f83a0d
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 17 00:14:44 2009 +0000

    Some platforms may need malloc.h for alloca.

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

commit f955d34bbdbb3377d2e3dc4aa54219b01ba463bc
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 17 00:06:48 2009 +0000

    Update CMake.

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

commit 23f33d74e817e171decf3915781634cbe9b19a2a
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 16 22:59:28 2009 +0000

    Added the LODS (load byte into register, usually
    as part string parsing) instructions to the Intel
    instruction tables.

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

commit d86d635d2831ee15f0e5bafb597d29f0318aaeb4
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Wed Sep 16 22:38:48 2009 +0000

    Add StringRef::{rfind, rsplit}

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

commit 2eddf5d5241b54e02b035b40f16ffa1e5effbe19
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 16 21:55:34 2009 +0000

    Added the LAR (load segment access rights)
    instructions to the Intel instruction tables.

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

commit 503784b9ecdc71df54e3f2b58917b5970c6fcdf5
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 16 21:50:07 2009 +0000

    Added the LOOP family of instructions to the Intel
    instruction tables.

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

commit 11490dcdcd8a798d9d009bfb12a32ab069a0b530
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 16 21:11:23 2009 +0000

    Added an alternate form of register-register CMP
    to the Intel instruction tables.

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

commit 3f7aeddf89537d10eebd50196576e3ec91d066e9
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 16 21:09:07 2009 +0000

    Fix typo.

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

commit a0fbb00ae6d27128232f1c11550b70bddb6fa76d
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 16 20:39:11 2009 +0000

    At iSel time, update DebugLoc based on debug info attached with an instruction.

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

commit a653f3541148079687b4c8b95e2dff2e1c91ad77
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 16 20:25:11 2009 +0000

    Add a new pass for doing late hoisting of floating-point and vector
    constants out of loops. These aren't covered by the regular LICM
    pass, because in LLVM IR constants don't require separate
    instructions. They're not always covered by the MachineLICM pass
    either, because it doesn't know how to unfold folded constant-pool
    loads. This is somewhat experimental at this point, and off by
    default.

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

commit 1ba76818a6b3281b86c8391cc07aafe821ad45cb
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 16 20:21:17 2009 +0000

    Print debug info attached with an instruction.

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

commit 94ef1628bb9b33484a3887a742fb4cc662b41fd8
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 16 20:20:44 2009 +0000

    Expand vector floating-point conversions not supported by NEON.

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

commit 1a2d32471a3fdc8f274411142bc8bc22294fa470
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 16 19:18:41 2009 +0000

    Now that llc can read .ll files directly, teach it to recognize .ll as
    an extension, so that the default output filename for foo.ll is foo.s,
    not foo.ll.s

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

commit 5223bf761d1d6ee0641bf2644e25265e84801926
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 16 18:20:05 2009 +0000

    Provide a way to extract location info from DILocation.

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

commit 7464a698dfc9a4b4a42a303e71eb327768288463
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 16 18:18:06 2009 +0000

    Parse debug info attached with an instruction.

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

commit 9514eca3ca9a35a0f5fc01763f6556bec579cc0e
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 16 18:16:11 2009 +0000

    Add an interface to attach debugging information with an instruction.

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

commit 4b1fad3ca2acec2db8d4c4545b8d5f74a2500b0f
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 16 18:09:00 2009 +0000

    Add llvm::Metadata to manage metadata used in a context.
    This interface will be used to attach metadata with an instruction.

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

commit 86776f75bfef82e33cbd7b9a63c1963b1dd1e7b8
Author: Kevin Enderby <enderby@apple.com>
Date:   Wed Sep 16 18:08:00 2009 +0000

    Fixed some problems with the logic of parsing line comments by adding
    isAtStartOfComment and using that instead in two places where a loop
    to check if the char was in MAI.getCommentString().

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

commit 01b83cfcffb62aea094d46d17348d592b0259825
Author: Kevin Enderby <enderby@apple.com>
Date:   Wed Sep 16 17:18:29 2009 +0000

    Fix incorrect assert that should be a user error for code like 'mov $0, %%eax'.

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

commit 09cf2b6d63c865ade854b6ec1cf62aecf9e9dcb2
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 16 16:50:24 2009 +0000

    Change FoldPHIArgBinOpIntoPHI to decline folding if it would introduce two
    phis, similar to the FoldPHIArgGEPIntoPHI change.

    Also, delete some comments that don't reflect the code.

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

commit 77b713700c3d57b01ec3463dd873f546905a9f3c
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 16 16:33:59 2009 +0000

    Fix the comment in this test.

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

commit e680e23e781542c39ba1501bee713dd3bf64ad09
Author: Xerxes Ranby <xerxes@zafena.se>
Date:   Wed Sep 16 14:36:35 2009 +0000

    Make cmake generated llvm-config output correct JIT backend for non X86 targets.

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

commit 9ccaf3f7c56c9f3e7e3359165f387895a1cd5ffa
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Wed Sep 16 11:43:12 2009 +0000

    Don't sort the vector when it is empty. This should fix some expensive checking
    failures.

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

commit ec139a0819923967e3c2b8a8e5fafa8859056b8b
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 16 11:35:50 2009 +0000

    Reapplied r81355 with the problems fixed.
    (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086737.html and
    http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090907/086746.html)

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

commit 9f16e4059d7e325248642d3a8051d83bec4c7404
Author: Xerxes Ranby <xerxes@zafena.se>
Date:   Wed Sep 16 10:18:36 2009 +0000

    updated lib/CodeGen/CMakeLists.txt to unbreak cmake build after r82018

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

commit b072028405dca8e4fab7f655c7622c2578e9353a
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 16 09:26:52 2009 +0000

    Preserve ProfileInfo during CodeGenPrepare.

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

commit 4117b16b1ef23390d1f1bde4a3f0a1d29250f667
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 06:25:03 2009 +0000

    move FnStubs/GVSTubs/HiddenGVStub handling out of the X86 asmprinter
    and use MachineModuleInfoMachO instead.

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

commit c3e800a55a04aae2d825fbcf5aed2102a68eaec5
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 06:04:53 2009 +0000

    revert a hunk of r82018 that wasn't supposed to go in yet.

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

commit f8a575424917e1f0e6921529c7be86d8825f7778
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 06:03:48 2009 +0000

    add a new MachineModuleInfoMachO class, which is the per-module
    stuff common across all macho targets.

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

commit 956017391974f44b14d1cb75e824e986841aeea6
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 05:42:12 2009 +0000

    apparently russians are really hard to sort or something!

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

commit 47d77721c88c70fa8cadbff68df8f2ac1e250e13
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 05:37:13 2009 +0000

    I can sort, no really.

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

commit 5ee2b3f29d829ac1b99d97d943ffea955d5ee210
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 05:36:54 2009 +0000

    make more clear since it is sorted by last name now.

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

commit 520339201d5c16d1c03d3e129b4cc00cb1f4c1dd
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 05:36:07 2009 +0000

    Doug is now the code owner for most of the Clang frontend.

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

commit 16fcdf9d05d09acde6146d531067fab0bf24f822
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 05:26:00 2009 +0000

    the pointer MMI keeps will start out with object-file format specific stuff

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

commit 242f740dcbfc14d95a6eaf5305ca794d28df9a13
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 05:25:43 2009 +0000

    tidy up

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

commit 4b658b8de70a1feabe23c000212d913d2816c7c0
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 05:20:33 2009 +0000

    rearrange X86ATTAsmPrinter::doFinalization, making a scan of
    the global variable list only happen for COFF targets.

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

commit 0f22f97df2231f18b11b6fe1847dc51a4da98747
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 04:59:30 2009 +0000

    Ted is christened as the owner of the clang static analyzer.

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

commit 500fba8363dccdd3dd29495831e5d689ddc50c49
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 04:57:15 2009 +0000

    remove the AsmPrinter::printMCInst hook hack now that
    we have MCInstPrinter.

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

commit d0390a18ad30aa3ed70d39b98ded744755434fde
Author: Shantonu Sen <ssen@apple.com>
Date:   Wed Sep 16 04:44:00 2009 +0000

    fix cmake build

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

commit 253e466f7a96658151b4c89c871386ec401311a0
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 04:12:47 2009 +0000

    use an accessor to simplify code.

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

commit 63715c73c20ed0358d5774bb481c9437fd234f54
Author: Nate Begeman <natebegeman@mac.com>
Date:   Wed Sep 16 03:20:46 2009 +0000

    Do not try and sink a load whose chain result has more than one use, when
    trying to create RMW opportunities in the x86 backend.  This can cause a
    cycle to appear in the graph, since the other uses may eventually feed into
    the TokenFactor we are sinking the load below.

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

commit 51b7a9968562cad4c543634dcf5b3e3ec1340611
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 16 02:57:13 2009 +0000

    Added the ENTER instruction, which sets up a stack
    frame, to the Intel instruction tables.

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

commit ca503e043f3871c7dd5254613b505f0f0e36c361
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 16 02:28:43 2009 +0000

    Added the definitions for one-bit left shifts to
    the Intel instruction tables.

    The patterns will stay blank because ADD reg, reg
    is faster, but having the encoding available is
    useful for the disassembler.

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

commit 37a534b8dca3f6890042845b8ebb50d47ffc2c08
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 16 02:01:52 2009 +0000

    Don't sink gep operators through phi nodes if the result would require
    more than one phi, since that leads to higher register pressure on
    entry to the phi. This is especially problematic when the phi is in
    a loop header, as it increases register pressure throughout the loop.

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

commit 1d64b2874ad916274fb18db31b1d898d58cb8076
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 16 01:54:38 2009 +0000

    Removed a few instructions that were already
    covered by other definitions.

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

commit 8886dc29cd311a78fd1f672904fd9a3af51c883c
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 01:46:41 2009 +0000

    Big change #1 for personality function references:
    Eliminate the PersonalityPrefix/Suffix & NeedsIndirectEncoding
    fields from MAI: they aren't part of the asm syntax, they are
    related to the structure of the object file.

    To replace their functionality, add a new
    TLOF::getSymbolForDwarfGlobalReference method which asks targets
    to decide how to reference a global from EH in a pc-relative way.

    The default implementation just returns the symbol.  The default
    darwin implementation references the symbol through an indirect
    $non_lazy_ptr stub.  The bizarro x86-64 darwin specialization
    handles the weird "foo@GOTPCREL+4" hack.

    DwarfException.cpp now uses this to emit the reference to the
    symbol in the right way, and this also eliminates another
    horrible hack from DwarfException.cpp:

    -    if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL"))
    -      O << "-" << MAI->getPCSymbol();

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

commit 73944d4e73d42ea7fcc2a3408c814a13c20c9b29
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Wed Sep 16 01:34:52 2009 +0000

    lit: Add a custom test format for use in clang.

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

commit d0da556cc3eeeac05071458f1544ef7ee05b5b65
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 01:29:11 2009 +0000

    remove a dead variable.

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

commit af90e3e1f69396d48d549d968e969d1d181ee4b9
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 01:26:31 2009 +0000

    add a helper method for creating MCSymbol and MCSymbolRefExpr at
    the same time.

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

commit 3d5824cc4efb252b69c86e871e4835ece6e16975
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 16 01:13:52 2009 +0000

    Added a variety of floating-point and SSE instructions.
    All of these do not have patterns (they're for the
    disassembler).

    Many of the floating-point instructions will probably
    be rolled into definitions that have patterns, and may
    eventually be superseded by mdefs.  So I put them
    together and left a comment.

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

commit 57c76b5eea6a1b4202941a0c3e7d06f0a00c8485
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 00:35:39 2009 +0000

    inline AsmPrinter::getCurrentFunctionEHName into its only caller.

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

commit 71dd44de32bd74e60887991c9f06ab3917229a52
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 16 00:32:15 2009 +0000

    Expand some more vector operations not supported by Neon.

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

commit e25bbf679b89aa172316ec349b4a541db246fde1
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 00:24:31 2009 +0000

    remove a dead bool.

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

commit c54a0890ddc80c1d7efa21695fb3159ef1b57cf8
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 00:17:39 2009 +0000

    Eliminate AsmPrinter::EmitExternalGlobal, inlining its (now)
    one implementation into its one caller.  This eliminates a totally
    awesome and gratuitous hack where we casted a Function* to
    GlobalVariable*.

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

commit 098abb4f0f560ae8e2c2e649f7e16046740f3cda
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 16 00:17:28 2009 +0000

    Neon does not support vector divide or remainder.  Expand them.

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

commit 8c7099069742b1fda9b8c3c7d513e67e566c6dbb
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 00:14:19 2009 +0000

    eliminate the PPC backend's implementation of EmitExternalGlobal
    and use PersonalityPrefix/Suffix to achieve the same effect (like
    the x86 backend).

    This changes the code generated for ppc static mode, but guess what,
    we were generating this before:

    	.byte	0x9B                                        ; Personality (indirect pcrel sdata4)
    	.long	___gxx_personality_v0-.                     ; Personality

    which is not correct! (it is not an 'indirect' reference).

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

commit 5632fabd0a6e1f30e9cbbd6c2b6d3dce6dcc656a
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 00:08:41 2009 +0000

    eliminate the horrid AsmPrinter::getGlobalLinkName method, inlining
    it into all of its call sites and simplifying them.

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

commit fe0e2534a5b2b89019a3d0ed2b55b0acb5ae4498
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 16 00:08:07 2009 +0000

    simplify some code

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

commit e8fefa0a3f88ebd6f5e24617ca5d5fe7c4734ef9
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 15 23:55:57 2009 +0000

    Expand all v2f64 arithmetic operations for Neon.
    Radar 7200803.  (This should also fix the
    SingleSource/UnitTests/Vector/sumarray-dbl test.)

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

commit dbaf51315fa3a150fca8aeed3e2b146d48749c9f
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 15 23:40:07 2009 +0000

    Put back non-obsolete -f sections for 'opt'.

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

commit 7a01257a044b62d94b6a049eb0d682ad35015ba3
Author: Sean Callanan <scallanan@apple.com>
Date:   Tue Sep 15 23:37:51 2009 +0000

    Added far return instructions (that is, returns to
    code in other segments) to the Intel instruction
    tables.

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

commit 36d0329a368bc31e7129c92b2e1c38559793a48d
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 23:11:32 2009 +0000

    remove some horrible MAI hooks which fortunately turn out to be always empty.

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

commit 451e8e6330161627a231f22d167d49dd0c374db8
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 22:58:35 2009 +0000

    strength reduce a call to PrintRelDirective(true).

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

commit 72ba67246b322935e03e118480c6b8c235669b35
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 22:44:26 2009 +0000

    add hooks to hang target-specific goop off MachineModuleInfo,
    move MachineFunctionInfo virtual method out of line to give it
    a home.

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

commit 4c9a0d70e34e1cc679f71bc5ca8e9554255b18d6
Author: Nate Begeman <natebegeman@mac.com>
Date:   Tue Sep 15 22:30:11 2009 +0000

    Do not add the SVOffset to the Node CSE ID.  The same pointer argument cannot have different
    SVOffsets.

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

commit 1482ed20fd413149c26101b5e3741e6ffe7ecf4e
Author: Eric Christopher <echristo@apple.com>
Date:   Tue Sep 15 21:56:46 2009 +0000

    Expand on comment.

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

commit 84df931976ddcf564c582d7385ec8ba305478ed7
Author: Sean Callanan <scallanan@apple.com>
Date:   Tue Sep 15 21:43:27 2009 +0000

    Updated comments per Eli's suggestion.

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

commit 3941cf7d66ec881570c0025013a9d70bcbfd1110
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 15 20:58:02 2009 +0000

    Convert more tests to FileCheck.

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

commit 7e7df0ef9db04445ae99dd1257213132b00d7010
Author: Sean Callanan <scallanan@apple.com>
Date:   Tue Sep 15 20:53:57 2009 +0000

    Added register-to-register ADD instructions to the
    Intel tables, where the source operand is
    specified by the R/M field and the destination
    operand by the Reg field.

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

commit 48f5114de937c031d43c91691806b04f55d35e2b
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 15 20:31:46 2009 +0000

    Drop the raw_ostream required buffer size to 1.

     - As best I can tell, we have eliminated all the code which used to require a
       larger buffer size.

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

commit 6dee039bc647d7ac37a135272648af92dec812e1
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 15 20:31:35 2009 +0000

    Remove references to obsolete -f option.

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

commit 0a2e0dfe5ec8c5fd8f15bb1f085d635708a7203c
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 15 20:31:28 2009 +0000

    Update llc/opt PODs to clarify they support .ll input.

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

commit ef65e0c69530a1832ba84028c8a25096b41e5f04
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 15 20:31:12 2009 +0000

    Fix -Asserts warning.

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

commit 91304e2755539fa6e746731028f25083ab09722f
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 15 20:09:17 2009 +0000

    lit: When finding nested test suites, check first in the execpath in case there
    is a site configuration.

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

commit 2494777a2cb2e6e78713b12c0658523856b44ecb
Author: Nate Begeman <natebegeman@mac.com>
Date:   Tue Sep 15 19:05:41 2009 +0000

    Better solution for tracking both the original alignment of the access, and the current alignment based
    on the source value offset.  This avoids increasing the size of mem nodes.

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

commit fb75cc9708004e58a40d63b3061b22b44a1c84b2
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 15 18:56:13 2009 +0000

    Correct comment pasto

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

commit ad87a3af74f9e84f1092e2a97ce28a98deb77437
Author: Sean Callanan <scallanan@apple.com>
Date:   Tue Sep 15 18:47:29 2009 +0000

    Added a new register class for segment registers
    to the Intel register table.
    Added 16- and 64-bit MOVs to and from the segment
    registers to the Intel instruction tables.

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

commit 5bf764bd78d33c4a1e1e0fc2dfdc72044ee70030
Author: Dale Johannesen <dalej@apple.com>
Date:   Tue Sep 15 18:32:14 2009 +0000

    Change the marker byte for stubs from 0xcd to 0xce (another form of
    interrupt instruction, which shouldn't arise any other way).  0xcd is
    also used by JITMemoryManager to initialize the buffer to garbage,
    which means it could appear following a noreturn call even when
    that is not a stub, confusing X86CompilationCallback2.  PR 4929.

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

commit d32037b8c08567c1b4e544cec0b3962f9172ae54
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 18:27:02 2009 +0000

    fix PR4984 by ensuring that fastisel adds properly sign extended GEP displacement
    values to machineinstrs.

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

commit fae4dc746dee18665ac310518148c503373eadd4
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 18:23:37 2009 +0000

    rename test

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

commit e22ad00d2c41cf95d58c05978b106cadd08d0fcc
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 18:23:23 2009 +0000

    convert to filecheck

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

commit 29af822131334c1b2507844c4807ba7852390fb0
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 18:03:13 2009 +0000

    add missing file

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

commit 19f0725ebd200ab818b0431a64943eebf61c794d
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 15 17:56:18 2009 +0000

    Handle AddrMode4 for Thumb2 in rewriteT2FrameIndex.  This occurs for
    VLDM/VSTM instructions, and without this check, the code assumes that an
    offset is allowed, as it would be with VLDR/VSTR.  The asm printer,
    however, silently drops the offset, producing incorrect code.  Since the
    address register in this case is either the stack or frame pointer, the
    spill location ends up conflicting with some other stack slot or with
    outgoing arguments on the stack.

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

commit fe9c3803a79895c50881154a3a381f61692e13ae
Author: Sandeep Patel <deeppatel1987@gmail.com>
Date:   Tue Sep 15 17:53:11 2009 +0000

    Fix superreg use in ARMAsmPrinter. Approved by Anton Korobeynikov.

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

commit 49102def1108f7c206537893c0ad47d359d00883
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 17:46:24 2009 +0000

    several major improvements to the sparc backend: support for weak linkage
    and PIC codegen.  Patch by Venkatraman Govindaraju!

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

commit 03dd9bb9a759b3cc6c658910a3923f8fb869e2fd
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 16:14:44 2009 +0000

    Teach ValueTracking how to look through GlobalAliases. GlobalAliases are
    not folded in the constant folder because the constant folder doesn't
    simplify ConstantExpr operands.

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

commit 2b1760f8c98ea4893ee8a9a97c351adf9a377219
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 16:00:30 2009 +0000

    Fix an accidental inversion of the inbounds flag.

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

commit 72444efbd46645993821a5167411656371e995b1
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 15:58:07 2009 +0000

    When a constant's type is refined, update the constant in place
    instead of cloning and RAUWing it.

     - Make AbstractTypeUser a friend of Value so that it can offer
       its subclasses a way to update a Value's type in place. This
       is better than a universally visible setType method on Value,
       and it's sufficient for the immediate need.

     - Eliminate the constant "convert" functions. This eliminates a
       lot of logic duplication, and fixes a complicated bug where a
       constant can't actually be cloned during the type refinement
       process because some of the types that its folder needs are
       half-destroyed, being in the middle of refinement themselves.

     - Move the getValType functions from being static overloaded
       functions in Constants.cpp to be members of class template
       specializations in ConstantsContext.h. This means that the
       code ends up getting instantiated twice, however it also
       makes it possible to eliminate all "convert" functions, so
       it's not a big net code size increase. And if desired, the
       duplicate instantiations could be eliminated with some
       reorganization.

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

commit 0682a468f8ced6a32d618480ce6ee3367cfaecc4
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 15:38:31 2009 +0000

    Use llvm-link -S instead of using llvm-dis.

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

commit d5939a47767d82e5d4d108c258b7f2320e30bc81
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 15:35:07 2009 +0000

    Give llvm-link a -S option.

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

commit 97b59da0a82c96d077a36f4e4a4417529d0e060c
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 15:33:42 2009 +0000

    Don't bother using a PassManager just to print a Module.

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

commit 43dcc4032dde26fad0276e724095b3f37853c6da
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 15:09:54 2009 +0000

    Restore a comment that was lost in the merge.

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

commit 95bb35e9ba16fcbff3d32a0e32d43f876203d172
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 15:08:33 2009 +0000

    Fix apostrophos.

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

commit 93a8e411672c28483ba69f42ad33746adedb7195
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 15 07:08:25 2009 +0000

    Add more newlines to make up for the ones removed from the end of instructions.

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

commit 527a06706f7a5582eb5ef4dbe1bd2cb2b893f5a0
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 15 07:05:12 2009 +0000

    Forgot this.

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

commit 6a48b00dc985aaf83b11bf1c6b31ccd4ba49ede6
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 15 06:45:16 2009 +0000

    Another try at early partial coalescing. Identity phi source copies (their sources are defined by phi join def) are coalesced. And the phi join copy is backward copy propagated into the other copies.

    Still miscompiling some tests. :-(

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

commit 9983d964324ffc3bba0d3dd128453d7e49af3c3d
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 06:34:29 2009 +0000

    convert to filecheck

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

commit b1208609ee4d18b2c0adaf860b72d0b2d5fd43d4
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 15 06:28:26 2009 +0000

    Forbid arrays of function-type and structures with function-typed fields.

    While I'm there, change code that does:
      SomeTy == Type::getFooType(Context)
    into:
      SomeTy->getTypeID() == FooTyID
    to decrease the amount of useless type creation which may involve locking, etc.

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

commit f0ecef80afbd600d9004952bce40b55da78b4a78
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 06:28:12 2009 +0000

    fix PR4963: folding insertvalue would sometimes turn a packed struct into
    an unpacked one.

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

commit 69177fbaef43d051fcc9a84184b2884f41765c6b
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 05:40:35 2009 +0000

    add a new CallGraphNode::replaceCallEdge method and use it from
    argpromote to avoid invalidating an iterator.  This fixes PR4977.
    All clang tests now pass with expensive checking (on my system
    at least).

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

commit 5957ef5d5226035be8d48b37260bcef1b171a288
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 05:14:57 2009 +0000

    add newline to debug dump

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

commit a6001e21c43647daff2d81359cb3e9e8c0f0843e
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 05:03:04 2009 +0000

    make -debug-pass=Executions show information about what call graph nodes
    are in the SCC for each execution of a CGSCC pass.

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

commit 8e3ba7439fb15df005a3125b0b9b6f51ea2697c9
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 04:45:26 2009 +0000

    add some missing quotes in debug output

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

commit d2d16acc4549ed7c075425a1337cc2a3b953f52c
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 04:37:49 2009 +0000

    switch scciterator to use DenseMap instead of std::map

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

commit 47fbf883bdac3403a5584be5ec476f11f083fa7f
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 04:27:29 2009 +0000

    this is failing on linux hosts, force a triple.

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

commit a045a696be25f2dec8969a68283582b33d660aae
Author: Ted Kremenek <kremenek@apple.com>
Date:   Tue Sep 15 04:06:36 2009 +0000

    Remove invalid add_dependencies line to unbreak the CMake build.

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

commit 5083953c49cfb42b74a512d6b876340cdb958733
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Tue Sep 15 03:39:45 2009 +0000

    Get rid of GetProcessId in Win32/Program.inc.

    GetProcessId was introduced only in XP. As a bonus, this change makes Program
    objects copyable, since Program is now basically a PID.

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

commit 4f21ba08e546e678bd6cc4c6efd66040507d8050
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 02:27:23 2009 +0000

    merge one more in.

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

commit dd42dc82ecfb2d3ec5a138e3dbf7c5249dac3b7d
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 02:25:21 2009 +0000

    merge some more cmov tests into cmov.ll

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

commit e8e2cc606cea71cfc40728aae2906ac85b4d2c7d
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 15 02:22:47 2009 +0000

    merge two cmov tests into one.

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

commit cbe5a493d522295f64e80d1dafd99360ebec7a99
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 01:22:01 2009 +0000

    Don't pull a load through a callseq_start if the load's chain
    has multiple uses, as one of the other uses may be on a path
    to a different node above the callseq_start, because that
    leads to a cyclic graph. This problem is exposed when
    -combiner-global-alias-analysis is used. This fixes PR4880.

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

commit 6647b934fcb19a24d6eb7a07750ce292d79205c3
Author: Nate Begeman <natebegeman@mac.com>
Date:   Tue Sep 15 00:38:09 2009 +0000

    Remove incorrect CSE code from r81813.

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

commit b7e7339c1e4bac5679c7a2e3b46f15d1460882c4
Author: Sean Callanan <scallanan@apple.com>
Date:   Tue Sep 15 00:35:17 2009 +0000

    Modified the Intel instruction tables to include
    versions of CALL and JMP with segmented addresses
    provided in-line, as pairs of immediates.

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

commit 3d711a3d76b29a8b13ec316c81d0161df47818ce
Author: Kevin Enderby <enderby@apple.com>
Date:   Tue Sep 15 00:27:25 2009 +0000

    Added the first bits of the ARM target assembler to llvm-mc.  For now it only
    parses the .word directive as 4 bytes and ARMAsmParser::ParseInstruction will
    give an error is called.  Broke out the test of the .word directive into two
    different test cases, one for x86 and one for arm.

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

commit 722f41892d746e32e0456a8e90640be7b93b4175
Author: Nate Begeman <natebegeman@mac.com>
Date:   Tue Sep 15 00:18:30 2009 +0000

    Substantially speed up combiner-aa in the following ways:

    1. Switch from an std::set to a SmallPtrSet for visited chain nodes.
    2. Do not force the recursive flattening of token factor nodes, regardless of
       use count.
    3. Immediately process newly created TokenFactor nodes.

    Also, improve combiner-aa by teaching it that loads to non-overlapping offsets
    of relatively aligned objects cannot alias.

    These changes result in a >5x speedup for combiner-aa on most testcases.

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

commit 9e1b9b6fc8c9553b28a676fda614db3d057aa368
Author: Nate Begeman <natebegeman@mac.com>
Date:   Tue Sep 15 00:14:28 2009 +0000

    Teach the legalizer to propagate the original alignment of loads and store when
    it splits them.

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

commit 5d38ee448663aae93e51b96d0fab617e191e6a80
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 15 00:14:11 2009 +0000

    On x86-64, the 32-bit cmov doesn't actually clear the high 32-bit of
    its result if the condition is false.

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

commit e22356dcb8d97062576619c5419a1140c76059dd
Author: Nate Begeman <natebegeman@mac.com>
Date:   Tue Sep 15 00:13:12 2009 +0000

    Add an "original alignment" field to load and store nodes.  This enables the
    DAG Combiner to disambiguate chains for loads and stores of types which are
     broken up by the Legalizer into smaller pieces.

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

commit a5e04816bd3e055c1ac97cc22a2035883ec763c6
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 14 23:39:10 2009 +0000

    When extending a memset range past the front, set the alignment of the
    memset region to the alignment of the new start address.

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

commit 713985a2dff2024cc0544f497714e239a01a6251
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Mon Sep 14 21:54:32 2009 +0000

    Expose initializing the native target for the execution engine.

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

commit f161b718f66f519f5fd348ec4619a1d928f25809
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Mon Sep 14 21:54:15 2009 +0000

    Make sure to initialize the fpm in the ocaml tutorial.

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

commit 95320818705e1a8a2ec6e0eaf009695c7b36630e
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Mon Sep 14 21:33:42 2009 +0000

    Add early coalescing to liveintervals. This is work in progress and is known to miscompute some tests. Read it at your own rish, I have aged 10 year while writing this.

    The gist of this is if source of some of the copies that feed into a phi join is defined by the phi join, we'd like to eliminate them. However, if any of the non-identity source overlaps the live interval of the phi join then the coalescer won't be able to coalesce them. The early coalescer's job is to eliminate the identity copies by partially-coalescing the two live intervals.

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

commit 3380dd66fb6f3cedf9fe83f56c8680802bfaf4cb
Author: Bill Wendling <isanbard@gmail.com>
Date:   Mon Sep 14 20:52:37 2009 +0000

    Pull the creation of the "RewindFunction" function out of the loop. It's only
    created once, so shouldn't be stuck in the middle of the loop. Also early exit
    if there are no uses of UnwindInst in the function.

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

commit 35d089b52ad103aedfe249070244d6bdf0ed7039
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 14 20:40:10 2009 +0000

    Update a comment to match the source. PseudoSourceValues are now
    obtained via accessor functions.

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

commit 3107c9ecfee9c403e89e3d5eccbc00d1099fc151
Author: Jim Grosbach <grosbach@apple.com>
Date:   Mon Sep 14 17:27:35 2009 +0000

    trivial whitespace cleanup

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

commit 9105aa9a9dc9f159335af3ff23b9f1f13f208069
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 16:49:26 2009 +0000

    add PR#

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

commit 9ab1d2e843fe3ce1ed9f135335e9ba92f72912b6
Author: Eric Christopher <echristo@apple.com>
Date:   Mon Sep 14 16:38:49 2009 +0000

    Enable the jit for llvm-config.

    Patch by Xerxes Rånby!

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

commit c662a414b78029f6716f128ae926333a77aaecd3
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 14 16:10:32 2009 +0000

    Add a valgrind suppressions file for x86_64/linux/4.3.3.

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

commit 9dbc0054b4e16f3d94c8009b5d510c3753ed7ca2
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 14 15:27:43 2009 +0000

    Add a VALGRIND_EXTRA_ARGS makefile variable, with the obvious semantics.

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

commit 6c3b4e242e24ed183d4561ce5a8222b441893698
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 14 05:22:54 2009 +0000

    Update CMake dependencies.

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

commit a303520a98b34359e350878fa54c91d314fc0dac
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 14 05:22:47 2009 +0000

    Update CMake.

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

commit da5fb6d704adbe833dcf16d12398a87a5af8d01e
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 03:15:54 2009 +0000

    PIC16 does allow colon after MBB labels, simplify EmitBasicBlockStart.

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

commit a835afd084f0e1c9ce65902b24eac79921547c79
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 03:02:37 2009 +0000

    Change MCAsmStreamer to take an MCInstPrinter instead of a
    full AsmPrinter, and change TargetRegistry to keep track
    of registered MCInstPrinters.

    llvm-mc is still linking in the entire
    target foo to get the code emitter stuff, but this is an
    important step in the right direction.

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

commit c2eadb171aaa638fa18a7f8ddcb4e9bc22a0fad8
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 14 02:39:01 2009 +0000

    Teach 'make check-lit' to run unittests.

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

commit e4fe594178a8ee98db0588bfb06d50916cdebc21
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 14 02:38:53 2009 +0000

    Attempt to fix some 4.0.0 build warnings.

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

commit 160f351b7f90ebedb6ef137ea020989769963b98
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 14 02:38:46 2009 +0000

    lit: Give test formats control over test discovery.

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

commit ffe6f6bed8d8b1a5e56088fd13b1f05f68c28051
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Mon Sep 14 02:25:34 2009 +0000

    Fix a pair of comment typos.

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

commit 5aab63425cb839d86e7ab908d5fc68f27c3b3b3d
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Mon Sep 14 02:25:19 2009 +0000

    Fifth time's a charm! Remove ourselves as abstract type listeners once we've
    been told that the type is no longer abstract.

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

commit e6eb694f39d6edf0cfa3be954776f13d2e959a13
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 01:49:26 2009 +0000

    Give MCInstPrinter a MCAsmInfo member, make X86ATTInstPrinter
    be a MCInstPrinter.

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

commit 3698084edee8995c957027958dd61a0d27e79849
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 01:43:38 2009 +0000

    add a new MCInstPrinter class, move the (trivial) MCDisassmbler ctor inline.

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

commit 5ec814dc4fd6e24fdbec8d092d4e9ba0c21d6dac
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 01:34:40 2009 +0000

    tidy up a bit.

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

commit c3f01e21df1740df29a8fbf30f16dca9bae44711
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 01:27:50 2009 +0000

    slightly increase prettiness.

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

commit 9ccbf08d37a60fb1d5f288ce4043f3f66d0822ed
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 01:26:18 2009 +0000

    emit the register table as a massive string to avoid relocations.

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

commit 7437911091faa98a519d2fbb16fd13e207708be1
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 01:19:16 2009 +0000

    move StringToOffsetTable out to its own header.

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

commit 07cb8119f076f45883139ccc1d4a9c283e69966e
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 14 01:16:36 2009 +0000

    factor string table generation out to its own class.  This changes
    the encoding of the AsmStrs table saving a byte or two.

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

commit b6db52a9bdf56bb5b0ae38cbf3b37a35102144ff
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Mon Sep 14 00:36:52 2009 +0000

    Don't leak! Always remove oneself as a listener after adding oneself.

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

commit 3f0d71da30b9523150a0287745e609d3b481be01
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 13 23:45:39 2009 +0000

    Actually remove old types from the set.

    Also break the type verification stuff into its own TypeSet to keep the
    Verifier pass from becoming an AbstractTypeUser.

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

commit 826ed7a271c9a966d58a379acdf492fa40c5ffb0
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 22:45:04 2009 +0000

    eliminate the TargetRegisterDesc::AsmName field, the asmprinters now have this table.

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

commit 00512f63d4d10e60ae18c8b46392ce49e663f0bd
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 22:42:03 2009 +0000

    kill off the last use of TRI::AsmName.

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

commit 1063d2402ec84d31cf67eaae00cda4822ba35b56
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 22:41:48 2009 +0000

    add some special case handling for strangely named x86 registers.

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

commit 4f1c655d38daf554042502391aac0b873d6d4d75
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 22:39:27 2009 +0000

    Build (not test) the unittests as part of a normal build.
     - 'make unittests' still builds and tests.
     - 'make unitcheck' inside a unittest directory runs the tests in that directory.

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

commit 84c0c9a5d338d233548b6f4bc8a81dcd47744be5
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 22:28:17 2009 +0000

    unbreak this test by working around an asmparser bug.

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

commit 98544f744488e29f215a07888500ec59e9fb490a
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 22:24:34 2009 +0000

    'printMCInst' doesn't print newlines after instructions anymore.

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

commit 453222b9fee0a048540a832ecab293dff2751c9c
Author: Oscar Fuentes <ofv@wanadoo.es>
Date:   Sun Sep 13 22:18:38 2009 +0000

    CMake: New user-settable variable LLVM_TARGET_ARCH useful when
    cross-compiling.

    Patch by Xerxes Rånby!

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

commit 6d2eab68c04d4b93330a22469a650f7fdaadfbb2
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 13 21:38:54 2009 +0000

    Update the tutorial to match changes to examples/Kaleidoscope.

    One change I'm not folding in is the removal of two unused variables that
    caused warnings, because those were there for expository purposes.

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

commit 7909eefe08511c595d7dc8b586abec9c65f2e1f8
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 21:31:21 2009 +0000

    Move unittest driver to utils/unittest/UnitTestMain.
     - This eliminates a race between building the unittests and linking the
       UnitTestMain library.

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

commit 435de3991f951fdaf77395572f740b7483662a91
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 21:31:07 2009 +0000

    Remove unused variables.

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

commit c904d5b8a23fc2ac8181b0e261f0f3292f379721
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sun Sep 13 21:07:59 2009 +0000

    Storing a set of PATypeHolders is a bad idea because their sort order will
    change as types are refined. Remove abstract types from CheckedTypes when they
    we're informed that they have been refined. The only way types get refined in
    the verifier is when later function passes start optimizing. Fixes PR4970.

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

commit f0a25de172e71282bba275a51ce75849e5407f8b
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 20:31:40 2009 +0000

    remove all but one reference to TargetRegisterDesc::AsmName.

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

commit 213703ced9eeaa585c06387ae3c643ea4701462e
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 20:19:22 2009 +0000

    the tblgen produced 'getRegisterName' method does not access
    the object, make it static instead of const.

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

commit ec219616d65bf4057d0c4509708b31f7979f7ad6
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 20:15:16 2009 +0000

    switch the x86 asmprinters to use getRegisterName instead
    of getting it from TRI, inst printing now is codegen context
    free!

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

commit 0288aeed1baf069135de8bc028e1c82efae7316e
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Sun Sep 13 20:14:57 2009 +0000

    Fix a small issue with recent changes to this code.

    The 'false.c' file wasn't being used.

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

commit 9222169c3ad7e619d1a8ab155b7a1118182c3c34
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 20:08:00 2009 +0000

    make tblgen produce a function that returns the name for a physreg.
    Nothing is using this info yet.

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

commit 28f7e3506ee1779753939d87c2ce4e1a2f19e9c0
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 19:48:37 2009 +0000

    eliminate an extraneous use of TRI::getAsmName in a comment.

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

commit 4957efed4f96e7af2efbcba4f5a6b3a6f255c795
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 19:44:38 2009 +0000

    make intel asmprinter use TRI::getAsmName instead of TRI::getName like
    all the other targets.  Add support for weak/linkonce linkage so it doesn't
    crash on basically all nontrivial testcases.

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

commit 59a6e61b92fa4a02cd9a68b5b6e4e63dee2ff524
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 19:30:11 2009 +0000

    split MCInst printing out of the X86ATTInstPrinter
    class into its own X86ATTInstPrinter class.  The inst
    printer now has just one dependence on the code generator
    (TRI).

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

commit b1c1268be8e349ed9ed5e8012fced58b60da23e2
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 19:10:08 2009 +0000

    reduce indentation with early exit.

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

commit 6f9b24922a442ab59668c859697e2f1b501eb46f
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 19:03:08 2009 +0000

    second part to r81695, I missed a directory.

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

commit 149495f84e67c353295dd54c4ca92ccd0fd3c1ef
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 19:02:16 2009 +0000

    remove MAI::JumpTableSpecialLabelPrefix now that MAI
    has real information about linker private linkage.

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

commit 893e8843309b5ca688046b1d11bc7f71eb5fc2a8
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 18:58:14 2009 +0000

    Revert unittests build changes temporarily, the unit test build isn't -j safe.

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

commit 7e659812c8d34377bc4d9516f1a116ccec4f073f
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 18:50:22 2009 +0000

    delete the fixme too! :)

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

commit e82fd5e49c2bcf148abe7b8e066076020944505c
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 18:46:37 2009 +0000

    merge the linux cpool/jtbl pic tests into pic.ll and convert to filecheck.

    Change the picbase symbol on non-darwin systems from ".Lllvm$4.$piclabel" to
    ".L4$pb".  The actual name doesn't matter and the darwin name is shorter.

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

commit 9b41b2da218ae60316e2bbb39bda56bcca893e21
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 18:43:46 2009 +0000

    Build (not test) the unittests as part of a normal build.
     - 'make unittests' still builds and tests.
     - 'make unitcheck' inside a unittest directory runs the tests in that directory.

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

commit b47f641f55f98d8ffecf935616fbe8f407a6c47b
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 18:33:59 2009 +0000

    make X86ATTAsmPrinter::PrintPICBaseSymbol forward to X86MCInstLower.

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

commit 2faa4ef57551d45e7b58b1827ae8156cea221637
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 18:25:37 2009 +0000

    replace printBasicBlockLabel with EmitBasicBlockStart,
    now that printBasicBlockLabel is only used for starting
    a MBB.  This allows elimination of a bunch of arguments.

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

commit adfec708f335a7ea93d685ae753f74a53ca05b83
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 18:11:09 2009 +0000

    fix MCSymbol printing on darwin to exactly match the mangler (handling of \n and " in a symbol name).

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

commit e66b5a5946e9737b7a230ba903779f4c9d15c542
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 18:04:46 2009 +0000

    Make the MC symbol printer and llvm::Mangler exactly agree on mangling
    for systems that don't support quoting (PR4966).

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

commit 126c8fe046bc70bf4289cf3d7889abc0bf0176a2
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 17:25:49 2009 +0000

    remove two docs about the old Sparc backend which used Value*'s for vregs.

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

commit 5027fd9cf5243d58fdacd2c37ac2dc498bdea6fd
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 17:24:16 2009 +0000

    move old clang readme here.

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

commit c6f802dd7f346ac5a44bbdc57d264ed928fe1e7c
Author: Chris Lattner <sabre@nondot.org>
Date:   Sun Sep 13 17:14:04 2009 +0000

    convert some uses of printBasicBlockLabel to use GetMBBSymbol
    instead.

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

commit 7f5f33b5ea2e756e9dd3df83c8924304ac317e4b
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 02:45:57 2009 +0000

    Add LLVMGCCBINDIR to path, since LLVMC expects to find llvm-gcc in the path.

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

commit 72a7ef551f36b66d339c6c0d91a99d6301ec872c
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 01:41:47 2009 +0000

    Switch Ocaml to use llvm_supports_binding.

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

commit 3324882bda68403c4723a6856f937320c3428849
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 01:41:18 2009 +0000

    tests: Add llvm_supports_binding predicate.

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

commit 282ae0b0efbe5ce5ce81c00cb4d89e813b78efc6
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 01:40:48 2009 +0000

    tests: Use %abs_tmp instead of ./%t to make these tests portable to 'lit'.

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

commit c46101cd59d21edd7614d3c2ad57119baebf0db4
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 01:39:50 2009 +0000

    tests: Add a %abs_tmp substitution which is guaranteed to be a full path.

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

commit 61e88aec10e345617c054125c4fdfdc7a692be47
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 01:39:08 2009 +0000

    Sink llvm-gcc dependent tests into distinct subdirs.

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

commit 8b6d1e38583dc7932d23c4803c223f54d79248dd
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 01:37:07 2009 +0000

    Rewrite tests to not use Tcl substitution.

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

commit 458d03ea01aa32891785347005f83ccf3944728a
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 13 01:36:19 2009 +0000

    Simplify LLVMC tests.

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

commit 02791b0d5c7fe12bf1ada874da30dd5d0440bc98
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Sun Sep 13 01:12:15 2009 +0000

    Fix merge problem

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

commit daf700156a4b1aec6f85be6f611f2f949b154f75
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Sun Sep 13 00:59:43 2009 +0000

    Define proper subreg sets for arm - this should fix bunch of subtle problems
    with subreg - superreg mapping and also fix PR4965.

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

commit b10a5950be94fe5cabce5d6d269bc37dc55bdd41
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 12 23:45:47 2009 +0000

    Add -mattr=+sse2 to the -march=x86 version of this test. Without
    sse, this code falls back to SelectionDAG isel which uses an x87
    instruction, which is fine, but not what this test is testing for.

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

commit 1b03709c07c801d218f32e90bb5a77dcaf999474
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 12 23:29:02 2009 +0000

    Experimental fix for PR4960.
     - Could we just always implement this as __clear_cache for __GNUC__?

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

commit 08c9708a8aed7028c5e3126d2d680ee1ffb4af9f
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 23:02:08 2009 +0000

    devirtualize AsmPrinter::printBasicBlockLabel since it is never overridden.
    Move GetMBBSymbol up to AsmPrinter and make printBasicBlockLabel use it so that
    we only have one place that decides what to name bb labels.  Hopefully various
    clients of printBasicBlockLabel can start using GetMBBSymbol instead.

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

commit 69f872cbd1278b340ac8ebb23edd441cd2a0c4da
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 22:57:37 2009 +0000

    we don't want people to override printBasicBlockLabel.

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

commit f1df5fea30bfd9fc1b9691dab547277aba769dcd
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 12 22:24:25 2009 +0000

    Remove unnecessary #include.

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

commit 3600d16e551d4b49d3d8df86d5c90061804d5c7f
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Sat Sep 12 22:21:08 2009 +0000

    Add QPR_VFP2 regclass and add copy_to_regclass nodes, where needed to
    constraint the register usage.

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

commit f2e096380d8ea7bd7cb5a47b66a9fa17ef34e365
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 12 22:02:17 2009 +0000

    Preserve the inbounds flag, so that the constant folder doesn't
    recompute it.

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

commit 07f468d98bf62faf754bc2c72cca515e8b6c9079
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 12 21:56:48 2009 +0000

    Fix the build when DEBUG_SYMBOL_TABLE is set.

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

commit 4f7a156181caf332944bcd5283cf25e074bdc51e
Author: Dan Gohman <gohman@apple.com>
Date:   Sat Sep 12 21:55:12 2009 +0000

    Convert llvm-link to IRReader.

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

commit da044747519b98d6579c6fd0638c863ee3506cb3
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 21:06:08 2009 +0000

    factor MBB label lowering better

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

commit 6874849b9aa710a542b2263e335bd9fe8e073d0b
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 21:01:20 2009 +0000

    X86MCInstLower::Lower should only not emit anything to OutStreamer,
    this means that it can only lower one MachineInstr to one MCInst.  To
    make this fly, we need to pull out handling of MO_GOT_ABSOLUTE_ADDRESS
    (which generates an implicit label) out of X86MCInstLower.

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

commit 34461fde24e25c4c789b719f16483367ef125e5c
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 20:45:03 2009 +0000

    eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
    MBB labels like everything else.

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

commit 1efc2adff3c3193bf402c9167cc3b06ec582a875
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 20:34:57 2009 +0000

    split MachineInstr -> MCInst lowering into its own class (not
    being embedded into X86ATTAsmPrinter).  This still depends heavily
    on X86ATTAsmPrinter, but this is a step in the right direction.

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

commit a16d146018dbdd8e840db89dae3a4c6fcf8aa947
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 20:01:36 2009 +0000

    remove the "old" at&t style asmprinter.  Unfortunately, most of the
    operand printing crapola cannot be removed yet because it is used by
    the inline asm print stuff.

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

commit 58831094f223f49d8fee7413d8ac5933599e4a40
Author: Lang Hames <lhames@gmail.com>
Date:   Sat Sep 12 04:54:18 2009 +0000

    Whoops. Committed the headers for r81605 - 'Moved some more index operations over to LiveIntervals.'

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

commit 2a7b3b261e96625d4fff876dbb859dec67e4c04e
Author: Lang Hames <lhames@gmail.com>
Date:   Sat Sep 12 03:34:03 2009 +0000

    Moved some more index operations over to LiveIntervals.

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

commit 2c2313a5e064b39cdbad9b0de471c722d800318a
Author: Sean Callanan <scallanan@apple.com>
Date:   Sat Sep 12 02:52:41 2009 +0000

    Added the WAIT instruction to the Intel tables,
    for the purposes of the disassembler.

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

commit 25220d648e0af4f977a0ff96fd6fabcf4e45ddb2
Author: Sean Callanan <scallanan@apple.com>
Date:   Sat Sep 12 02:25:20 2009 +0000

    Added CMPS (string comparison) instructions for all
    operand widths to the Intel instruction tables, for
    the purposes of the disassembler.

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

commit d0d3ee158facc0f354906b1e5559b73ce0fd20e7
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 12 02:14:41 2009 +0000

    Remove -new-coalescer-heuristic. It's not useful.

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

commit 16c2f62b7c53316702d1ad99d7c33a08f5f5ced7
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sat Sep 12 02:01:07 2009 +0000

    80 col violations.

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

commit 3f74d67bcb2ebcb53e4ad66c05bdc668a0859542
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 01:11:50 2009 +0000

    fix another GCC bootstrap problem, which manifested as things
    like:
    foo.s:2412:non-relocatable subtraction expression, "_gomp_tls_key" minus "L1$pb"

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

commit 34184c9a753003dd6161e5f4f8770e906996621d
Author: Chris Lattner <sabre@nondot.org>
Date:   Sat Sep 12 00:49:00 2009 +0000

    fix an embarassing typo that resulted in llvm-gcc bootstrap miscompare
    because the sorting wasn't sorting.

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

commit 481f06df77485baab41d3facb6eb9903ee1b1b13
Author: Sean Callanan <scallanan@apple.com>
Date:   Sat Sep 12 00:37:19 2009 +0000

    Added SCAS instructions in their 8, 16, 32, and
    64-bit variants for the disassembler.

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

commit 8d13e71bb592c47f214eefc3cfdc016b12ff6396
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 11 22:07:31 2009 +0000

    Fix -Asserts warning.

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

commit 0cc7539863622c30066b5110a48827dfd55675e8
Author: Ted Kremenek <kremenek@apple.com>
Date:   Fri Sep 11 21:49:45 2009 +0000

    Update CMake files.

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

commit 3996be16362bda84e8975ac6aef9f36358cad869
Author: Douglas Gregor <doug.gregor@gmail.com>
Date:   Fri Sep 11 21:26:24 2009 +0000

    De-bork CMake build. llvm-extract depends on asmparser

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

commit 31b20c7d4a2789da21fe865cc5e7cfa3f6fdd581
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 20:46:33 2009 +0000

    Fix llvm-extract's "writing bitcode to a terminal" warning, which wasn't
    working. To support this, add an is_displayed() function to raw_ostream,
    and generalize Process::StandardOutIsDisplayed and friends in order to
    support it.

    Also, call RemoveFileOnSignal before creating a file instead of after, so
    that the file isn't left behind if the program is interrupted between when
    the file is created and RemoveFileOnSignal is called.

    While here, add a -S to llvm-extract and port it to IRReader so that it
    supports assembly input.

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

commit 5b01f934c23227abf954e317b5b65cc77f38c21d
Author: Jim Grosbach <grosbach@apple.com>
Date:   Fri Sep 11 20:13:17 2009 +0000

    Revert array initialization regclass change so that the initialization stays static, not runtime.

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

commit 21f15abfa99b786925bb1b36717b454ac800251b
Author: Jim Grosbach <grosbach@apple.com>
Date:   Fri Sep 11 19:49:06 2009 +0000

    Update register class references to use the global constant ARM::*RegisterClass names.

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

commit 8562bef1079463f9d3027bd6cfb688e99298bede
Author: Sean Callanan <scallanan@apple.com>
Date:   Fri Sep 11 19:01:56 2009 +0000

    Added ADC, SUB, SBB, and OR instructions that operate
    on rAX and an immediate.

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

commit 53fac396f5ba849f8837234584303c72fd229747
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Fri Sep 11 18:42:18 2009 +0000

    Fix pr4820: Don't run llvm-config during "make clean" since it may have
    already been removed.

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

commit 8d8e16bb62905b1b14aea9481c4d085bf1c02796
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 18:41:06 2009 +0000

    Remove an unnecessary -f.

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

commit 0cb2f6731090cfc8b56679c7802983d16a21fd92
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 18:36:27 2009 +0000

    Convert more tests to avoid llvm-as.

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

commit bb9fe84e889c35f2010090c5d0d13198b57c3327
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 18:33:44 2009 +0000

    fix pasto

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

commit 9da96d8044dc814a45010e9f78af212c189cc447
Author: Caroline Tice <ctice@apple.com>
Date:   Fri Sep 11 18:25:54 2009 +0000

    Don't generate Dwarf line table entries for source line 0.

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

commit 1ee2ec58cab5d4aa340aa50f67af4cd99ef184b6
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 18:20:26 2009 +0000

    fix some fixmes: emit stubs in sorted order.

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

commit 66c8021be5351d77c0d1cd8dd52f694ad837b741
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 18:17:12 2009 +0000

    Eliminate more redundant llvm-as calls.

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

commit 869beecde3919f7332925a43c336778be770d3b5
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 18:16:43 2009 +0000

    Fix this test to test what it was originally intended to test.

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

commit 3054c0f431010e796b0328150f93aa000f06e863
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 18:15:46 2009 +0000

    give densemap iterators real iterator traits.

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

commit 3c7d3083e7c99a22ee4803048dfb86c7a57b1006
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 18:01:28 2009 +0000

    Change tests from "opt %s" to "opt < %s" so that opt doesn't see the
    input filename so that opt doesn't print the input filename in the
    output so that grep lines in the tests don't unintentionally match
    strings in the input filename.

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

commit a24946acb21bffc40e9054f7ac25eb9319b406d8
Author: Duncan Sands <baldrick@free.fr>
Date:   Fri Sep 11 17:24:29 2009 +0000

    Fix PR4948 (and a leak): by not destroying the DwarfException
    object, the timer it creates was not being deleted.  Since the
    timer belonged to a static timer group, the timer group would
    be destroyed on shutdown, and would notice and complain that
    not all timers it contained were destroyed.

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

commit 6cd70ca0ab41c5eab214b92689b072f3fe53bb37
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 17:07:27 2009 +0000

    turn on -experimental-asm-printer for x86 / AT&T by default.

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

commit fe7ed54bd19fceebdf98f3420567afacf9674904
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 17:07:01 2009 +0000

    another random update

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

commit c9f609938abc0aa496f65cec8baaccca78b4af81
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 17:05:29 2009 +0000

    reject attempts to take the address of an intrinsic, PR4949.

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

commit 9a8e2f2f2b6fc5e9c6122ab1539d56ef2198577d
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 17:02:12 2009 +0000

    fix a bunch of spurious failures for people whose home directory
    is sabre.

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

commit 3c4ea8fe60cd502437e00f7e5a402329aaef79f7
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 16:49:18 2009 +0000

    this test is using invalid "intrinsics".

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

commit c3ad76ad92f6abf6d251e1dfa240c64c19e5bf90
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 16:47:41 2009 +0000

    fix test to not get a moduleid that matches 'br'

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

commit 099640405eda144320bed8acb8db97153779100a
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 16:33:58 2009 +0000

    default construct MCInst's ctor to 0, which is "PHI" which is invalid for MCInsts.

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

commit d11bf276c72fb90393a1c8e04ca6ba25553d5739
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 11 15:47:24 2009 +0000

    ... and fix the REQUIRES_RTTI condition.

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

commit 7985717063d5538f40b90c688f7da9ba8f8c2bf8
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 11 15:45:13 2009 +0000

    Fix REQUIRES_RTTI while awake.

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

commit 1e12b8277f6064a999129a526587d8e7378cb2f3
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 11 15:39:39 2009 +0000

    Make REQUIRES_RTTI work.

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

commit f207074410fd77ba40ef110b17a6442b42aed6f1
Author: Owen Anderson <resistor@mac.com>
Date:   Fri Sep 11 09:01:57 2009 +0000

    Eliminate some unnecessary implicit constructors in generated DAG ISel code.

    Partial fix for PR4946.

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

commit c88e8254682141c4155c39a021038ea7c0c40cdd
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Fri Sep 11 08:43:15 2009 +0000

    Bugfix. Sorry.

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

commit 2634e55f8a73b58ee7399bf55e1cbc21457d3c50
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Fri Sep 11 08:39:33 2009 +0000

    Make ProfileEstimator even more robust on general CFGs.

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

commit 67e71746b1a96204a9f43688df0115f6fc731bfe
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 07:03:20 2009 +0000

    switch HiddenGVStubs to be a DenseMap instead of a string map, mirroring FnStubs and GVStubs.

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

commit d17abcab0f6c1ccf446a4447a269d1b2709700f8
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 06:59:18 2009 +0000

    Fix a bug I introduced in FnStubs generation, switch GVStubs to be a
    densemap instead of StringMap to match FnStubs.

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

commit 25c61740e62d7ea5191b0d81da96102a266ef6c7
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 06:36:33 2009 +0000

    change FnStubs from being a StringMap<std::string> to being a much
    more efficient SmallPtrSet<MCSymbol*>.  This eliminates string
    craziness and fixes CodeGen/X86/darwin-quote.ll with the new asmprinter.

    Codegen is producing stubs in a nondeterminstic order, but it was doing
    this before anyway.

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

commit 2fdf82ddf5816c13fe660d6309e1e09c1550e6df
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 05:59:55 2009 +0000

    printInstruction() no longer prints a \n after itself, do it
    for the two instruction MOVPC32r sequence.

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

commit 2eaccff47f159c4a90dc8c53f9d81898f6081bd9
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 05:58:44 2009 +0000

    reimplement X86ATTAsmPrinter::GetGlobalAddressSymbol in terms of
    Mangler::getNameWithPrefix.  In addition to avoiding some over
    quoting, this also is more efficient because it uses smallvector
    instead of std::string thrashing.

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

commit a84c2917d3f8412b093af06801a595dcf8e00ee0
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 05:51:29 2009 +0000

    fix prefix ordering, it's L_foo not _Lfoo

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

commit bd7e1108fe9851970a8f9cf190defddde49ab16b
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 05:40:42 2009 +0000

    add a new Mangler::getNameWithPrefix API which returns the
    (uniqued if unnamed) global variable name with the prefix that
    it is supposed to get.  It doesn't do "mangling" in the sense of
    adding quotes and hacking on bad characters.

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

commit 2fe752edba6d2b52a4171262ad9281a3cf21b003
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 04:36:43 2009 +0000

    convert X86ATTAsmPrinter::GetExternalSymbolSymbol to use SmallString
    instead of std::string and Mangler.

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

commit e6fe945acbcf6c92f3b8e9b193f588e1404a9576
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 04:28:13 2009 +0000

    rearrange some code, export a SmallString version of DecorateCygMingName.

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

commit 9d1e4fa6fdfac2bd80e049ef298365d764553302
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 01:49:31 2009 +0000

    more typos

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

commit 5b7dbbf6ff503a3bd10b87ebeeed3e48e36e0d55
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 11 01:01:31 2009 +0000

    Follow up to 81494. When the folded reload is narrowed to a 32-bit load then change the destination register to a 32-bit one or add a sub-register index.

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

commit 58f44f226573975dce94b0bd23b95c2b2df80d56
Author: Chris Lattner <sabre@nondot.org>
Date:   Fri Sep 11 00:41:15 2009 +0000

    PHI nodes can never reach the asmprinter, assert and die instead of printing
    out an illegal "PHINODE" instruction.

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

commit 8f0797fd72559a3066290f87c4f79a257bf64fc6
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 11 00:39:26 2009 +0000

    It's not legal to fold a load from a narrower stack slot into a wider instruction. If done, the instruction does a 64-bit load and that's not
    safe. This can happen we a subreg_to_reg 0 has been coalesced. One
    exception is when the instruction that folds the load is a move, then we
    can simply turn it into a 32-bit load from the stack slot.

    rdar://7170444

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

commit 8c5f55f3e68092a732e6d3fa0dac6de724461a44
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 00:36:43 2009 +0000

    Make fast-isel try ISD::FNEG before resorting to bitcasts and xors.

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

commit b144a5210c2df1b248b0c92fbf18f0cb1f9f9f91
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 00:34:46 2009 +0000

    Reapply r81171 with a fix: don't try to use i64 when it
    isn't legal.

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

commit 78894ba572c0da894a177328a0b37d4e8b0cff39
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 00:05:10 2009 +0000

    Fix indentation.

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

commit 6200a6ec5cb2d2474317cf7c801d242ec25595f4
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 11 00:04:14 2009 +0000

    Teach lib/VMCore/ConstantFold.cpp how to set the inbounds keyword and
    how to fold notionally-out-of-bounds array getelementptr indices instead
    of just doing these in lib/Analysis/ConstantFolding.cpp, because it can
    be done in a fairly general way without TargetData, and because not all
    constants are visited by lib/Analysis/ConstantFolding.cpp. This enables
    more constant folding.

    Also, set the "inbounds" flag when the getelementptr indices are
    one-past-the-end.

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

commit db050e9d9673fda33b4acbf67b1137a6a91e74b7
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 10 23:37:55 2009 +0000

    Factor out the code for checking that all indices in a getelementptr are
    within the notional bounds of the static type of the getelementptr (which
    is not the same as "inbounds") from GlobalOpt into a utility routine,
    and use it in ConstantFold.cpp to check whether there are any mis-behaved
    indices.

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

commit ce128857e923728587cf38bac23d9f6ba231ca01
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 10 23:07:18 2009 +0000

    Give these files top-level comments that describe the current code.

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

commit ffc801c29e1d6fa3f6ff2d4236b671b4183b67a1
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Sep 10 22:36:12 2009 +0000

    Fix whitespaces.

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

commit 13d28af8449cfa2269589ffb95b3c1d66e9e888c
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 22:14:16 2009 +0000

    Fix validation errors.

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

commit ca831f14d40e32df191244092c71e47a3b3498b0
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 22:12:50 2009 +0000

    Fix validation errors.

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

commit bdebfa961d5a71ebab1e0e622dd2abb463fff8aa
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Thu Sep 10 22:09:31 2009 +0000

    Don't swap the operands of a subtraction when trying to create a
    post-decrement load/store.

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

commit 22457ddb96b05ae203164134cc748b43a120ad26
Author: Dale Johannesen <dalej@apple.com>
Date:   Thu Sep 10 22:01:32 2009 +0000

    Fix uppercaseo.

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

commit ae90d09ea43ca4b0dfa02d2c6d679f81380231ed
Author: Kevin Enderby <enderby@apple.com>
Date:   Thu Sep 10 20:51:44 2009 +0000

    Added the ParseInstruction() hook for target specific assembler directives so
    that things like .word can be parsed as target specific.  Moved parsing .word
    out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes
    for other targets that support the .word directive.

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

commit 546b28bd90852f0bea34a6dc10cf22de5a773252
Author: Victor Hernandez <vhernandez@apple.com>
Date:   Thu Sep 10 20:18:57 2009 +0000

    Fit code within 80 columns

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

commit 794457a9a6c91baf493f12fe081f70924b1b7c33
Author: Sean Callanan <scallanan@apple.com>
Date:   Thu Sep 10 19:52:26 2009 +0000

    Added XOR instructions for rAX and immediates of
    various widths.

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

commit 70953a5bee9da7718fab97c9db999041dd38666d
Author: Sean Callanan <scallanan@apple.com>
Date:   Thu Sep 10 18:33:42 2009 +0000

    Added MOV instructions between rAX and memory offsets,
    including segment offsets and (for 8-bit operands)
    absolute offsets.

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

commit 9f3c3f5e4ad869045baed502d9b041f55847f42f
Author: Sean Callanan <scallanan@apple.com>
Date:   Thu Sep 10 18:29:13 2009 +0000

    Added a variety of PUSH and POP instructions, including
    ones capable of accessing R/M operands instead of just
    registers.

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

commit f2c39f52d692834fd39bfb37e942840188554463
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 18:28:06 2009 +0000

    Exit early if exception handling isn't supported.

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

commit 7360cdd2ba9923efb70579ec60480c5408edac21
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Thu Sep 10 17:04:32 2009 +0000

    Allow llvmc to take .bc files as input.

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

commit 9fc3b22df49c0bce6268f337a17e196cbedee72c
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Thu Sep 10 16:30:38 2009 +0000

    Make ProfileEstimator more robust on general CFGs.

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

commit 5d83433e2b5a37237f7cce22addd8fb1bbb92306
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 10 16:25:02 2009 +0000

    add another broken version of gcc, thanks to Niels Moller for pointing this out.

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

commit fcccb9fa64db28ccbb9bdb06341160465dc64a79
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Thu Sep 10 16:22:02 2009 +0000

    Distinguish between 'empty' and empty DAG marker.

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

commit a125693f1475029900a6764451778cecfbbc69bf
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Thu Sep 10 16:21:38 2009 +0000

    Add a logical 'not' operator to llvmc's TableGen dialect.

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

commit 6df6696a9d9f9691db9498c865b3abe013cbbe37
Author: Nuno Lopes <nunoplopes@sapo.pt>
Date:   Thu Sep 10 14:56:31 2009 +0000

    fix leakage of Module

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

commit 90deca07b0cfa2fdceb9cba6e2abd470659444b9
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Thu Sep 10 11:31:39 2009 +0000

    Add some braces to make newer GCCs happy and update CMakeLists.

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

commit 61a788cef4f56ff000806c0c267a7ace68e4f1e2
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Thu Sep 10 07:12:35 2009 +0000

    Cleaned up code by factoring out common portions of edge loading into function.

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

commit 70ae96f3e7d2070972d280cecc2ccf13bdea3974
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Thu Sep 10 07:02:09 2009 +0000

    Correctly handle the case where a comparison is created in one BasicBlock and
    used by a terminator in another.

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

commit 7bb50b4935836725b83eefeb1e90d0a659ef15a5
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 06:50:01 2009 +0000

    Comment and whitespace cleanups. No intentional functionality change.

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

commit 74446ffeba3226ae63f9a437230fe0f407a308d4
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 06:27:16 2009 +0000

    Revert part of my r81424 patch. I removed what looked like superfluous padding
    from the exception tables. However, Duncan explained why it's a can of worms to
    do it the GCC way. I went back to doing it the LLVM way and added Duncan's
    explanation so that I don't do this again in the future.

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

commit a511570cf8e6859deef445efe8a0db3707e10f95
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 10 05:08:51 2009 +0000

    Add a test case for r81431.

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

commit 67d34bd5b31add07ba8413b05d019e22f35d9a0e
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 10 04:56:59 2009 +0000

    Remove prcontext.

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

commit e5406467385df42184feed2f03fbdab5ac38c9f5
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 10 04:36:43 2009 +0000

    Add malloc call utility functions. Patch by Victor Hernandez.

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

commit 5c6e5ae3c8ec8cc5df9f82b4c51d67105e941e5f
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 02:07:37 2009 +0000

    Don't hardcode the TType format size. In fact, rework the code so that it's more
    like what GCC outputs. The mysterious code to insert padding wasn't in GCC at
    all. I modified the TType base offset code to calculate the offset like GCC
    does, though.

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

commit 50e503fc4a90ecd8e98266c4a68c566e5f3e315f
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 10 01:23:53 2009 +0000

    Proper support of non-lazy indirect symbols.

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

commit 630d3b5c3e116554239d4c50032d2c1b9a01738d
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 01:12:47 2009 +0000

    Remove the "#if 0" that Noone loved. It wasn't really necessary, because the
    code within it was the same inside and out. There's still a problem of the
    TypeInfoSize should be the size of the TType format encoding (at least that's
    what GCC thinks it should be).

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

commit 9ba888a01e1f53c88d8a491b35cee78b170d2ff5
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 10 00:59:15 2009 +0000

    MC: Give target specific parsers access to the MCStreamer.

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

commit 9aadf0b01025e9a91a285fe87cf58353cc8aa61e
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Thu Sep 10 00:49:22 2009 +0000

    Revert r81171 which was causing pr4927.

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

commit d832f2cd021588a797c00175a894f63d652b3755
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 00:17:04 2009 +0000

    Pull check for SJLJ EH into a boolean and use that.

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

commit 1961846a4701a5cd43a8d7f2624138da0f745e1f
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 00:13:16 2009 +0000

    Use the SizeOfEncodedValue function instead of magic variables for the
    sizeof(DW_EH_PE_udata4).

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

commit f551420260bd4eb5e4ca6307eb9ae4d411154061
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 10 00:04:48 2009 +0000

    Add helpful comment.

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

commit e99c6d49ea0f6f3b562af85580bdf18bd278b933
Author: Bill Wendling <isanbard@gmail.com>
Date:   Wed Sep 9 23:56:55 2009 +0000

    Believe it or not, this is a simplification. :-)

    Basically, this patch is working towards removing the hard-coded values that are
    output for the CIE. In particular, the CIE augmentation and the CIE augmentation
    size. Both of these should be calculated. In the process, I was able to make a
    bunch of code simpler.

    The encodings for the personality, LSDA, and FDE in the CIE are still not
    correct. They should be generated either from target-specific callbacks (blech!)
    or grokked from first-principles.

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

commit 71429f87316fc88ebe54b904c4b1326a71fbc3ec
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 9 23:55:03 2009 +0000

    Fix double load / store multiple encoding.

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

commit 431b4df9155bfbe94d3b50a1f1bdebfa9055cb44
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 23:46:42 2009 +0000

    canonicalize namespace gymnastics

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

commit b53d938b38393b624f7f12269c9784cd5116c3bf
Author: Dale Johannesen <dalej@apple.com>
Date:   Wed Sep 9 23:37:46 2009 +0000

    Testcase for (llvm-gcc) 81399.  Adjust an older
    test case to allow for different, functionally
    identical output.

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

commit 10371a5fdd1b829b3ce0cbd6d0721c700bde1e55
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 9 23:14:54 2009 +0000

    Fix pr4939: Change FPCCToARMCC to translate SETOLE to ARMCC::LS.
    See the bug report for details.

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

commit 32d4cc74e1075b6d9f77c75ff6099784ad4f15b2
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 23:14:36 2009 +0000

    remove DebugLoc from MCInst and eliminate "Comment printing" from
    the MCInst path of the asmprinter.  Instead, pull comment printing
    out of the autogenerated asmprinter into each target that uses the
    autogenerated asmprinter.  This causes code duplication into each
    target, but in a way that will be easier to clean up later when more
    asmprinter stuff is commonized into the base AsmPrinter class.

    This also fixes an xcore strangeness where it inserted two tabs
    before every instruction.

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

commit c53c4e5693d079829a7a78d662e691217aaf190f
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 23:09:29 2009 +0000

    Fix a subtle bug in "return;" generation which caused us to miss
    a return in one case.  Instead of sprinking return handling code
    throughout the asmprinter generator, just treat it like any other
    normal statement.

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

commit fa50179c30d291443d10d93a7ec6eb4958ee1ac5
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Wed Sep 9 23:01:25 2009 +0000

    Add comment re: clang dependency.

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

commit ffdf10df7ba8b1cef378d86ab11912a95b04e8d4
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 9 22:49:13 2009 +0000

    Added an abstract superclass, MCDisassembler, for
    all disassemblers.

    Modified the MemoryObject to support 64-bit address
    spaces, regardless of the LLVM process's address
    width.

    Modified the Target class to allow extraction of a
    MCDisassembler.

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

commit be23fd415c91d6b17149b67497316d9593305e05
Author: Bill Wendling <isanbard@gmail.com>
Date:   Wed Sep 9 21:26:19 2009 +0000

    Use the EOL that takes the encoding and translates it into DWARF-English.

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

commit c38ebcb176943ab2d8c5e0aa458f3f18990f15b8
Author: Bill Wendling <isanbard@gmail.com>
Date:   Wed Sep 9 21:08:12 2009 +0000

    Early exit from function.

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

commit cb3105b639197e0e15486fa17beeee74682a608c
Author: Bill Wendling <isanbard@gmail.com>
Date:   Wed Sep 9 21:06:24 2009 +0000

    Small amount of code clean-up: Don't use ".size()" when not necessary.

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

commit a0741b254540f2c14be367e5de6f893e6b817f35
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 20:45:42 2009 +0000

    add a gross hack to get "SrcLine" comments to show up with the
    new asmprinter.  Differently gross hack coming next.

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

commit e34788cb7ed482bf3b51075f1b06ccc03021fbac
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 20:34:59 2009 +0000

    hoist the call to processDebugLoc out of the generated
    asm printer into the "printInstruction" routine.  This
    fixes a problem where the experimental asmprinter would
    drop debug labels in some cases, and fixes issues on ppc/xcore
    where pseudo instructions like "mr" didn't get debug locs properly.

    It is annoying that this moves the call from one place into each
    target, but a future set of more invasive refactorings will fix
    that problem.

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

commit a46d337b041e98c716269c600e3097cc5cca64ae
Author: Lang Hames <lhames@gmail.com>
Date:   Wed Sep 9 20:14:17 2009 +0000

    Removed static qualifier from a few index related methods. These methods may require a LiveIntervals instance in future.

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

commit 5af655e4025b57503a223cbfba2e540f5bab113f
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 9 18:19:35 2009 +0000

    Reverted r81358.

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

commit f06a9bac9d29e83d24d667ed42f1028e493de42d
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 9 18:18:18 2009 +0000

    Fix SplitCriticalEdge to properly update LCSSA form when splitting a
    loop exit edge -- new PHIs may be needed not only for the additional
    splits that are made to preserve LoopSimplify form, but also for the
    original split. Factor out the code that inserts new PHIs so that it
    can be used for both. Remove LoopRotation.cpp's code for manually
    updating LCSSA form, as it is now redundant. This fixes PR4934.

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

commit 8aa5c72ebecdde5b86c4564ef6059faf34eb1ed7
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Wed Sep 9 18:03:46 2009 +0000

    Fix build, add missing simicolon.

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

commit a89b291eb4dee0605e7618653dac2634fea14e92
Author: Mike Stump <mrs@apple.com>
Date:   Wed Sep 9 17:57:16 2009 +0000

    Reflow comment.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81361 91177308-0d34-0410-b5e6-96231b3b80d8

commit f193e18b174a8fe51242aabb07f3c0a4f39415af
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 9 17:53:39 2009 +0000

    Preserve ProfileInfo.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81360 91177308-0d34-0410-b5e6-96231b3b80d8

commit a1eaf2a024b2338fcdf2ffab01b7169319969830
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 9 17:52:57 2009 +0000

    Add the first functions for updating ProfileInfo.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81359 91177308-0d34-0410-b5e6-96231b3b80d8

commit ba865fcfc00592809b38bad4e65aa5eebd9103bd
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 9 17:51:39 2009 +0000

    Cleaned up code by factoring out common portions of edge loading into funcion.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81358 91177308-0d34-0410-b5e6-96231b3b80d8

commit 26f6d849e4659e4bb4944359b302fd2aa0e0155b
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 9 17:44:26 2009 +0000

    Take lock before removing a node from MDNodeSet.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81356 91177308-0d34-0410-b5e6-96231b3b80d8

commit 44c965aed1380578a557b9367f94dee4261dd28d
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 9 17:30:04 2009 +0000

    Enable MDNode uniquing.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81355 91177308-0d34-0410-b5e6-96231b3b80d8

commit ae4f2739f3a56d33a4049ca94b06021b2bd9bc7e
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 9 17:17:19 2009 +0000

    Fix an 80-column violation.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81354 91177308-0d34-0410-b5e6-96231b3b80d8

commit 94e5001925e25df698a8372024f06bd8581e6edf
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 9 17:07:07 2009 +0000

    Gracefully destroy MDNodes.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81353 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0d0ae7a4285264213962e906068c98dcf97f2b8e
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 9 16:47:12 2009 +0000

    Hide all cscope files.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81350 91177308-0d34-0410-b5e6-96231b3b80d8

commit 99a2c97352dfd94a4b94fc6f23f8f0dd6f1ff7be
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 9 16:45:41 2009 +0000

    Updated svn:ignore to hide *.cmx files.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81349 91177308-0d34-0410-b5e6-96231b3b80d8

commit 920911d1e9f01bca349c9cf90fe78712491a4766
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 16:00:57 2009 +0000

    revert r81335, which breaks the build.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81347 91177308-0d34-0410-b5e6-96231b3b80d8

commit da58ebcc2659fad293f11e4cd48f9d92b7fc594b
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 9 14:22:57 2009 +0000

    When widening a vector load, use the correct chain. This fixes PR4891.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81343 91177308-0d34-0410-b5e6-96231b3b80d8

commit ca1fa68f6f989937a2233797e0f7e6942c4d3b6a
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 9 13:01:03 2009 +0000

    Fixed wrong storage option for ProfileVerifierDisableAssertions.
    Fixed non working -profile-verifier-noassert option.
    Fixed missing newline in debugEntry().
    Cleaned up assert messages. (assert(0 && Message) is still shown, but the message is printed before.)
    When verifiying loaded profiles the ProfileVerifier got confused when block was a setjmp target, this is checked now.
    When verifiying loaded profiles the ProfileVerifier got confused when block eventually reaching an exit(), this is checked now.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81338 91177308-0d34-0410-b5e6-96231b3b80d8

commit 20bfe16d937eb797d4248dec6c2a57b691779e35
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 9 12:48:26 2009 +0000

    Updated ProfileInfo to have clean seperation between different sentinels.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81335 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7662985fce9b2ca4b60bc57321142a7149fe63d2
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Wed Sep 9 12:09:08 2009 +0000

    Add a shortcut for OS X to Path::GetMainExecutable. This gives a nice speedup on
    clang's testsuite.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81333 91177308-0d34-0410-b5e6-96231b3b80d8

commit c755dc57023bd41f52fa464c2fd5008b2171a0c0
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Wed Sep 9 10:14:55 2009 +0000

    Copy-pasto.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81331 91177308-0d34-0410-b5e6-96231b3b80d8

commit 00456a75b37a9e1edda5a37657037001eb2deee9
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Wed Sep 9 09:52:04 2009 +0000

    Revert 81248 for now.

    Program objects have ownership semantics on Windows.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81329 91177308-0d34-0410-b5e6-96231b3b80d8

commit fd1f9fef9648975b0a201da42797d12415eeb83a
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Wed Sep 9 09:51:47 2009 +0000

    Check that the 'kill' call succeeded.

    Thanks to Duncan Sands for spotting this.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81328 91177308-0d34-0410-b5e6-96231b3b80d8

commit ebd2da13f15d830ecbac3ffb953fc00bfde9bab2
Author: Edwin Török <edwintorok@gmail.com>
Date:   Wed Sep 9 09:34:43 2009 +0000

    Add testcase for r81322 (PR4933).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81327 91177308-0d34-0410-b5e6-96231b3b80d8

commit 58b79487c4ff0f1a4d6c39ce02ab323a73c20b03
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Wed Sep 9 08:48:53 2009 +0000

    Provide proper section flags for various BSS flavours

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81322 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5e258a3086667213fb50e920d661bd91a7c0c134
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Wed Sep 9 08:41:20 2009 +0000

    Whitespace cleanup

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81321 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4de5778fc6ee03ef9b6f2c79a3c92f1886b90e73
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 06:19:34 2009 +0000

    add a testacse for the objc problem that required required r81305
    to be temporarily disabled.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81320 91177308-0d34-0410-b5e6-96231b3b80d8

commit 965cb2f51ad0e6a8e6e22d1d348057c82a7994b6
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 06:11:14 2009 +0000

    disable the new asmprinter by default.  Both the Mangler and MCSymbol
    printing stuff are quoting symbols now, breaking objc testcases.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81319 91177308-0d34-0410-b5e6-96231b3b80d8

commit 52f6f63fbd1339c08b982355b62b85dc344add50
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 9 06:05:16 2009 +0000

    Cast MO.getImm() to unsigned before comparing with an unsigned limit.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81318 91177308-0d34-0410-b5e6-96231b3b80d8

commit 509ea0c591607793cc3fdf076b80c5743b72ef17
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Wed Sep 9 05:04:01 2009 +0000

    Make TypeBuilder's result depend on the LLVMContext it's passed.
    TypeBuilder was using a local static variable to cache its result. This made it
    ignore changes in its LLVMContext argument and always return a type constructed
    from the argument to the first call.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81316 91177308-0d34-0410-b5e6-96231b3b80d8

commit 00b667ca7c080da239365c2b129fa85854005ecb
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Wed Sep 9 02:41:50 2009 +0000

    Update test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81314 91177308-0d34-0410-b5e6-96231b3b80d8

commit 8acf90f7d6f9850e5192cb6530261aa5d829663b
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Wed Sep 9 02:41:42 2009 +0000

    Count test correctly with -q.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81313 91177308-0d34-0410-b5e6-96231b3b80d8

commit 00a068c0defbc610732b89f79904cd04e0a70dc0
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Wed Sep 9 02:41:32 2009 +0000

    Fix another refactoro.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81312 91177308-0d34-0410-b5e6-96231b3b80d8

commit c84d4d3a2e752a4ba621587c066c1177cb8d5f40
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 9 01:56:29 2009 +0000

    Make sure to make stub region writable before emission, executable after emission.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81311 91177308-0d34-0410-b5e6-96231b3b80d8

commit a989293ca8e2c88ac10cf6fb577a9ece58b7b845
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 9 01:47:07 2009 +0000

    Fix arm jit encoding bug introduced by 75048. Some instructions', e.g. MOVi, bit 25 should be set.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81310 91177308-0d34-0410-b5e6-96231b3b80d8

commit fa04aba9a45c6870836e614150182cd487aa7af3
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 9 01:45:24 2009 +0000

    Make sure the memory range is writable before memset'ing it.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81308 91177308-0d34-0410-b5e6-96231b3b80d8

commit 204d7688f36dfed6dd487371db80ad9140b36986
Author: Eric Christopher <echristo@apple.com>
Date:   Wed Sep 9 01:44:53 2009 +0000

    Correct __cxa_end_catch documentation to reflect that it doesn't take any arguments.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81307 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7b3c2ad4b0e7825170e90aadb07fe99408d4046b
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 9 01:38:23 2009 +0000

    Remove comments which don't add much to .s readibility.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81306 91177308-0d34-0410-b5e6-96231b3b80d8

commit 89e53b29fc360d43953ac7df1fbded8e33ed9956
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 00:41:36 2009 +0000

    turn the mcinst asmprinter on by default for x86, tweaking two tests to
    expect the slight syntax differences in the generated code.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81305 91177308-0d34-0410-b5e6-96231b3b80d8

commit 78c95d8c68ea762991d677773b07eb4d082bfcbc
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 00:40:31 2009 +0000

    tidy up

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81304 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9cecef9d4ce35724024f8df6dac209897a76d6f1
Author: Bill Wendling <isanbard@gmail.com>
Date:   Wed Sep 9 00:30:25 2009 +0000

    Remove failing test...

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81303 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4c8121fc171afe801eab440d89443985b136b53f
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 9 00:23:52 2009 +0000

    Add an svn:ignore.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81302 91177308-0d34-0410-b5e6-96231b3b80d8

commit d456b2e7d9e9d219e1d429104a35cb6ea5db91ab
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 00:23:32 2009 +0000

    make sure to send external symbols through the mangler,
    this fixes mingw-alloca.ll with the new asmprinter.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81301 91177308-0d34-0410-b5e6-96231b3b80d8

commit abe57efd23c3d7f05b01aa30be895f5ae3a41ff4
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 9 00:22:49 2009 +0000

    Use "opt < %s" instead of "opt %s" to keep the testname away from the grep.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81299 91177308-0d34-0410-b5e6-96231b3b80d8

commit 44130371343172fe453917c41f74dd795e2fe85e
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 00:22:31 2009 +0000

    this got merged into lea.ll

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81298 91177308-0d34-0410-b5e6-96231b3b80d8

commit b39ffdf617c65df69bddce5d456bbfb63426060b
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 00:19:46 2009 +0000

    filecheckize

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81297 91177308-0d34-0410-b5e6-96231b3b80d8

commit 98d648dc6c48b4a9cc0d8126ec22d10ccf51813e
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 00:14:09 2009 +0000

    allow @ in symbol names without quoting the identifier.  This
    allows things like @PLT without quotes.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81296 91177308-0d34-0410-b5e6-96231b3b80d8

commit 6b3593ac463ad21559e0097a268888c79e4e403e
Author: Bill Wendling <isanbard@gmail.com>
Date:   Wed Sep 9 00:11:02 2009 +0000

    Fix PR4865. This syncs up the JIT's DWARF emitter with what's in the
    'DwarfException.cpp' file, which changed how CIEs were emitted, the sizes of
    some fields, etc.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81295 91177308-0d34-0410-b5e6-96231b3b80d8

commit 50470b55a378c023286f09325ae098496becc002
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 9 00:10:14 2009 +0000

    add support for @PLT and friends on external symbols, fixes
    x86-64-pic-11.ll with the new asmprinter.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81294 91177308-0d34-0410-b5e6-96231b3b80d8

commit da594cf0865888a79fe498de539e2285430674cb
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 9 00:09:15 2009 +0000

    Eliminate more uses of llvm-as and llvm-dis.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81293 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0a063105e432e649d64d354a3ea4b295172ed6cf
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 23:54:48 2009 +0000

    Eliminate more uses of llvm-as and llvm-dis.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81290 91177308-0d34-0410-b5e6-96231b3b80d8

commit 801631d7291d79bf1e9381dcd07e1f2af2b9eeb7
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 23:51:06 2009 +0000

    update various tests for signedness changes in .s file.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81289 91177308-0d34-0410-b5e6-96231b3b80d8

commit 793df4a99f1c9c201d1d660c469eb396fd30c926
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 23:44:53 2009 +0000

    adjust for signedness change.  I'd appreciate it if an ARM flavored person
    could look at this: the top undefined bits of an immediate shouldn't affect
    isel (cmp vs cmp.w)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81288 91177308-0d34-0410-b5e6-96231b3b80d8

commit f104fefd323bde3c0259a290322b01883457ed5a
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 23:44:24 2009 +0000

    Merge Archive/extract* tests into one; this avoids a race when tests are run in
    parallel (the test should really use temps for the output, though).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81287 91177308-0d34-0410-b5e6-96231b3b80d8

commit 84be013efdfb9340a10c2f2821211423d0a962ab
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 23:41:06 2009 +0000

    merge thumb2-bic2.ll into thumb2-bic.ll and update for signedness changes.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81285 91177308-0d34-0410-b5e6-96231b3b80d8

commit 221813a2d67821161ca4604121d3d4b9a5e3c406
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 23:32:51 2009 +0000

    Add Triple::getArchTypeForDarwinArchName, which converts a "Darwin" architecture
    name (e.g. "ppc") to the appropriate constant.

    Also, StringRefize additional Triple constructor.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81274 91177308-0d34-0410-b5e6-96231b3b80d8

commit ee69fee764b11c7e480bb29ef351f93062bbdcca
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 23:32:40 2009 +0000

    tweak this to pass on linux.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81273 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4b349f2003f776ef5bca4e009bf0af96a884ca52
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 23:32:35 2009 +0000

    Improve JIT error message for users crazy enough to use -march with JIT, and
    mention -version in messages about missing targets.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81272 91177308-0d34-0410-b5e6-96231b3b80d8

commit 75410d8bc45d8536e7a7c7acdce7b7a064256291
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 23:20:50 2009 +0000

    parenthesize symbol names that start with $, fixing X86/dollar-name.ll with
    the new asmprinter.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81269 91177308-0d34-0410-b5e6-96231b3b80d8

commit cd30f56da8ae5252a5028754cbf035d4081c6cb7
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 23:16:26 2009 +0000

    convert to filecheck syntax

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81267 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0ac501ab8363823363bb62cba3f3bde409d8c5b5
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 23:05:44 2009 +0000

    change selectiondag to add the sign extended versions of immediate operands
    to instructions instead of zero extended ones.  This makes the asmprinter
    print signed values more consistently.  This apparently only really affects
    the X86 backend.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81265 91177308-0d34-0410-b5e6-96231b3b80d8

commit fa540692bfbce485b154f35b13f10748819d19e1
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 22:57:49 2009 +0000

    Use "opt < %s" instead of "opt %s" so that opt doesn't print the test
    filename in the output, which interferes with the tests' grep lines.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81263 91177308-0d34-0410-b5e6-96231b3b80d8

commit 14636a5b8822276713045b4322b1f9f9c0c7c600
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Tue Sep 8 22:51:43 2009 +0000

    Unbreak getOnesVector() / getZeroVector() to use valid ARM extended imm's.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81262 91177308-0d34-0410-b5e6-96231b3b80d8

commit f15d065c6f04c706e8262c116d3d4d4040f5eb64
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 22:41:33 2009 +0000

    Convert a few more opt | llvm-dis to opt -S.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81261 91177308-0d34-0410-b5e6-96231b3b80d8

commit d9352009ee611a1443f5dca5202ffc76430fd385
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 22:38:46 2009 +0000

    filecheckize some tests

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81259 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5bb7c7c3b0d45867a9770d5468624cbefe37adad
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 22:34:10 2009 +0000

    Use opt -S instead of piping bitcode output through llvm-dis.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81257 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1e4519c64ba34818ace9858444a66399be7eecfd
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 22:20:35 2009 +0000

    Use MemoryBuffer::getBufferIdentifier() in the AsmPrinter instead
    of requiring a name be passed in. This makes it use "<stdin>"
    instead of "-" and makes it more consistent with the Bitcode reader.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81256 91177308-0d34-0410-b5e6-96231b3b80d8

commit 61cf99d511f74bef0739cdbfbbcf7094d3db2303
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Tue Sep 8 20:31:27 2009 +0000

    This should unbreak the build on 64-bit Linux.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81252 91177308-0d34-0410-b5e6-96231b3b80d8

commit 66b57f3a2a4891f05392bdffb6717326f99b9bc6
Author: Owen Anderson <resistor@mac.com>
Date:   Tue Sep 8 19:53:15 2009 +0000

    Fix PR4909, patch by Jakub Staszak.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81250 91177308-0d34-0410-b5e6-96231b3b80d8

commit c5e639c1b8eb54e0af46b3a529d0a1cac39f8ded
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Tue Sep 8 19:51:39 2009 +0000

    Const-correctness.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81249 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7490029b28358b8251bf525e199b2618a7da4afa
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Tue Sep 8 19:51:12 2009 +0000

    Since Program is basically a PID, it should be copyable.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81248 91177308-0d34-0410-b5e6-96231b3b80d8

commit 460b0175ff36930e7ab2a0c1e0ac1c861b704765
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Tue Sep 8 19:50:55 2009 +0000

    Get rid of the Pid_ member in the Program class.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81247 91177308-0d34-0410-b5e6-96231b3b80d8

commit a28016831340436a42b077c2711e040c46cb106f
Author: Mikhail Glushenkov <foldr@codedgers.com>
Date:   Tue Sep 8 19:50:27 2009 +0000

    Add a Kill() function to the Program class.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81246 91177308-0d34-0410-b5e6-96231b3b80d8

commit 83d45d7286b38453c8182486393dabde6f28c574
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 19:45:34 2009 +0000

    another typo

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81243 91177308-0d34-0410-b5e6-96231b3b80d8

commit e951acadc8f81264295608f02ea3f7dcbb0e3846
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 8 18:52:20 2009 +0000

    Do not specify -mmacosx-version-min if building for arm-apple-darwin.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81240 91177308-0d34-0410-b5e6-96231b3b80d8

commit a97bc6042d8356416520f6daf9c9269c3afde89b
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 18:48:01 2009 +0000

    remove an extremely dubious instcombine transformation of
    extractelement(load).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81239 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1c440a116254922bcaeae433788bfb170a8546e1
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 8 18:14:36 2009 +0000

    Remove dead code.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81235 91177308-0d34-0410-b5e6-96231b3b80d8

commit d873a95ab04653b72825b360c48420e6763f3da3
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 17:03:05 2009 +0000

    Trim unnecessary declarations.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81227 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1b4c27779eba0ad4edeb73d1c2855345ad56f6ff
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 16:50:01 2009 +0000

    Change these tests to feed the assembly files to opt directly, instead
    of using llvm-as, now that opt supports this.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81226 91177308-0d34-0410-b5e6-96231b3b80d8

commit 06db349124125c3fc5c310afeb56be0d2d81aacb
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 16:14:54 2009 +0000

    Fix may-be-used-uninitialized warning.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81223 91177308-0d34-0410-b5e6-96231b3b80d8

commit 25de0deb077ad1db2da9b0ed3ba6c0efc07a936d
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 15:52:56 2009 +0000

    llvm-as is no longer needed here, now that opt can read assembly
    files directly.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81222 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9cec4125f92b12880692c3e4a378b792a85ea67a
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 15:45:00 2009 +0000

    Re-apply r80926, with fixes: keep the domtree informed of new blocks
    that get created during loop unswitching, and fix SplitBlockPredecessors'
    LCSSA updating code to create new PHIs instead of trying to just move
    existing ones.

    Also, optimize Loop::verifyLoop, since it gets called a lot. Use
    searches on a sorted list of blocks instead of calling the "contains"
    function, as is done in other places in the Loop class, since "contains"
    does a linear search. Also, don't call verifyLoop from LoopSimplify or
    LCSSA, as the PassManager is already calling verifyLoop as part of
    LoopInfo's verifyAnalysis.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81221 91177308-0d34-0410-b5e6-96231b3b80d8

commit dd528195c766db4211a29e0955e5f888f322dc37
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Tue Sep 8 15:22:32 2009 +0000

    Add NEON 'laned' operations. This fixes another bunch of gcc testsuite fails and
    makes the code faster.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81220 91177308-0d34-0410-b5e6-96231b3b80d8

commit c802e48f18be86250b5249a8f545fc61ae858aa6
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 15:13:16 2009 +0000

    fix a couple typos pointed out by edwin and duncan

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81219 91177308-0d34-0410-b5e6-96231b3b80d8

commit ce4265b24fa707a83b564c814a66d6f4ca7e76fe
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 14:14:24 2009 +0000

    Unbreak these tests. Chris, please verify that these changes are intended.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81217 91177308-0d34-0410-b5e6-96231b3b80d8

commit b246f53c4457fe7787ba675807eb78e8c4cdd540
Author: Richard Pennington <rich@pennware.com>
Date:   Tue Sep 8 12:47:30 2009 +0000

    Add source debug information to the Sparc code generator.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81215 91177308-0d34-0410-b5e6-96231b3b80d8

commit 99c816857be050d35719a3425f46a4ac1b1057e7
Author: Nicolas Geoffray <nicolas.geoffray@lip6.fr>
Date:   Tue Sep 8 07:39:27 2009 +0000

    When emitting a label for a PostCall safe point, the machine
    instruction to insert before can be end(). getDebugLoc on
    end() returns an invalid value, therefore use the debug
    loc of the call instruction, and give it to InsertLabel.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81207 91177308-0d34-0410-b5e6-96231b3b80d8

commit d326c7aff924917ceb6cb9b9a788865941d8b531
Author: Nicolas Geoffray <nicolas.geoffray@lip6.fr>
Date:   Tue Sep 8 07:36:18 2009 +0000

    Also emit a label for TargetInstrInfo::GC_LABEL.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81206 91177308-0d34-0410-b5e6-96231b3b80d8

commit a04450b1cad35ec96eb4b15d5646661232475a51
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Tue Sep 8 07:30:03 2009 +0000

    Unbreak

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81205 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4f6c7da13e517fa7aacc7514bbff034365823970
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Tue Sep 8 06:39:07 2009 +0000

    When remat'ing and destination virtual register has a sub-register index. Make sure the sub-register class matches the register class of the remat'ed instruction definition register class.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81204 91177308-0d34-0410-b5e6-96231b3b80d8

commit b051a8456f5c4ef77a845b6359f32cd26b6938a8
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 06:37:35 2009 +0000

    Print "X-42" instead of "X+-42".

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81203 91177308-0d34-0410-b5e6-96231b3b80d8

commit 914d43ea8fcbcc97cf319ce1ea86af4489797ca2
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 06:34:07 2009 +0000

    make formatting of expressions more closely match the existing asmprinter.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81202 91177308-0d34-0410-b5e6-96231b3b80d8

commit 44ef733215a9c96583d0d74f32b79fd2017718e5
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 06:27:48 2009 +0000

    tidy whitespace.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81201 91177308-0d34-0410-b5e6-96231b3b80d8

commit a2724d2a6913f8ec77ccd2291249cbe11d4405d2
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 06:26:40 2009 +0000

    disable some irrelevant eh emission

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81200 91177308-0d34-0410-b5e6-96231b3b80d8

commit 420109d27c41cf7306706d14ca814636294f2b55
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 06:25:12 2009 +0000

    add support for some missing modifiers on jumptable/constant pool entries.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81199 91177308-0d34-0410-b5e6-96231b3b80d8

commit c638baf0df2f24ebf41eca5f8521a69ad1a5a076
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 06:19:15 2009 +0000

    add a bunch more evil lowering code to work around various :subreg32 modifiers
    in the .td files.  This gets us down to 18 failures in codegen/x86 with the
    new asmprinter.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81198 91177308-0d34-0410-b5e6-96231b3b80d8

commit bad5239b41aae2d840894165a79bd315e511d520
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 06:08:07 2009 +0000

    lit needs bash for tcl-as-sh execution, we use set -o pipefail.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81197 91177308-0d34-0410-b5e6-96231b3b80d8

commit 06418126b47276fa17a388ee789fdf2b65bf75e9
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 06:03:07 2009 +0000

    ADd support for "lowering" the X86::MOVZX16rr8/X86::MOVZX16rm8
    subreg32 modifiers.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81196 91177308-0d34-0410-b5e6-96231b3b80d8

commit a2683c9d41df3f486f949333263ae6a1fd3e8289
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 05:49:25 2009 +0000

    add a hack to lower MOV16r0 to MOV32r0 in MCInstLower, eliminating
    the problem with subreg32 modifiers.  This gets all of Olden working
    with the new asmprinter.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81195 91177308-0d34-0410-b5e6-96231b3b80d8

commit 926c3ff188a32c57f740994172fc2cde75504dfd
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 05:46:28 2009 +0000

    Fix typo that worked on python 2.6.

    Also, fix unit tests.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81194 91177308-0d34-0410-b5e6-96231b3b80d8

commit 6ed791867cfb7fe82e3f9dd512efe4e33c4f6f51
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 8 05:46:15 2009 +0000

    Hoist out the test+insert to CheckedTypes. This doesn't seem to affect
    performance.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81193 91177308-0d34-0410-b5e6-96231b3b80d8

commit c6be620e43ce72f3e7c4a0acf3f8d05020c5c536
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 05:37:51 2009 +0000

    Fix a refactoro.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81192 91177308-0d34-0410-b5e6-96231b3b80d8

commit 12ffa4de8df01f0dc0533945d05ea8466d79c104
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 05:31:44 2009 +0000

    Add 'lit' support for llvm tests.
     - This adds 'make check-lit' from the top-level Makefile.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81191 91177308-0d34-0410-b5e6-96231b3b80d8

commit fb15e592d9d89cf2ad3949ecc601848c5d930f0f
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 8 05:31:18 2009 +0000

    Add 'lit' testing tool.
     - make install && man $(llvm-config --prefix)/share/man/man1/lit.1 for more
       information.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81190 91177308-0d34-0410-b5e6-96231b3b80d8

commit 599c392e8d93a229de7d1a6a7182b40e33791f3c
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 05:15:50 2009 +0000

    llvm::cerr is gone.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81189 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1efd4fd6a1b967fc3f0dbbd0d9c835ea5eec4f21
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 05:14:44 2009 +0000

    update this to use raw_ostream

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81188 91177308-0d34-0410-b5e6-96231b3b80d8

commit c3195875c346108303d315cac0c245d80f980dfb
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 04:55:44 2009 +0000

    fix PR4767, a crash because fp stackifier visited blocks in
    depth first order, so it wouldn't process unreachable blocks.
    When compiling at -O0, late dead block elimination isn't done
    and the bad instructions got to isel.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81187 91177308-0d34-0410-b5e6-96231b3b80d8

commit d069a058917c5968774064354516f628159971c6
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 03:47:41 2009 +0000

    remove a turd

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81186 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1ba36b786d8c051e764fb39e0c2503ba1f19dc92
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 03:44:51 2009 +0000

    instcombine transforms vector loads that are only used by
    extractelement operations into a bitcast of the pointer,
    then a gep, then a scalar load.  Disable this when the vector
    only has one element, because it leads to infinite loops in
    instcombine (PR4908).

    This transformation seems like a really bad idea to me, as it
    will likely disable CSE of vector load/stores etc and can be
    better done in the code generator when profitable.  This
    goes all the way back to the first days of packed types,
    r25299 specifically.

    I'll let those people who care about the performance of vector
    code decide what to do with this.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81185 91177308-0d34-0410-b5e6-96231b3b80d8

commit a48dd11cea464022adf7c557c46b28abf148283a
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 03:39:55 2009 +0000

    fix pasto

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81184 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1e63feec4518f1c1d86121cd8f7957cf1211f720
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 03:32:53 2009 +0000

    add getVectorOperand/getIndexOperand accessors to ExtractElementInst.
    Fix some const correctness problems in SelectInst.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81183 91177308-0d34-0410-b5e6-96231b3b80d8

commit 134e5d925b66c14c38438c0beca9b0f3bc30db47
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 8 02:02:39 2009 +0000

    Simplify from my last change. Assert1 is a macro that makes its caller return,
    so "Assert1(isa<>); cast<>" is a valid idiom.

    Actually check the PHI node's odd-numbered operands for BasicBlock-ness, like
    the comment said.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81182 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1b9f83a3e87d2b6cbcf1af525f0b1796c17fd571
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 8 01:44:02 2009 +0000

    Fix an abort on a store of an empty struct member. getValue returns
    null in the case of an empty struct, so don't try to call getNumValues
    on it.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81180 91177308-0d34-0410-b5e6-96231b3b80d8

commit d95bc887780e7af86abcf45c64d8772936ed6475
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Tue Sep 8 01:23:52 2009 +0000

    Verify types. Invalid types can be constructed when assertions are off.

    Make the verifier more robust by avoiding unprotected cast<> calls. Notably,
    Assert1(isa<>); cast<> is not safe as Assert1 does not terminate the program.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81179 91177308-0d34-0410-b5e6-96231b3b80d8

commit d9ac5deabfa68d437de63461d45b9c2912f527b9
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 01:22:54 2009 +0000

    fix PR4915, a crash in -debug mode.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81177 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4a748b0f120835f4e83b77cfa761b504125ec817
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 00:27:14 2009 +0000

    Fix PR4882, by making MemCpyOpt not dereference removed stores to get the
    context for the newly created operations.

    Patch by Jakub Staszak!

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81175 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1698f255e9973fbc44b66852770e289db3abfa83
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 00:13:52 2009 +0000

    fix ComputeMaskedBits handling of zext/sext/trunc to work with vectors.
    This fixes PR4905

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81174 91177308-0d34-0410-b5e6-96231b3b80d8

commit 6e27672525f06113d206f961212ccd7db9226240
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 8 00:06:16 2009 +0000

    add some comments to describe the invariants.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81173 91177308-0d34-0410-b5e6-96231b3b80d8

commit f3a08b82db22aa66dd10f9a939993c7797baf32e
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 23:54:19 2009 +0000

    Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81172 91177308-0d34-0410-b5e6-96231b3b80d8

commit c4d34a74cd602a2a0438efade40a536d67ed38a3
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 23:47:14 2009 +0000

    Fix a thinko: When lowering fneg with xor, bitcast the operands
    from floating-point to integer first, and bitcast the result
    back to floating-point. Previously, this test was passing by
    falling back to SelectionDAG lowering. The resulting code isn't
    as nice, but it's correct and CodeGen now stays on the fast path.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81171 91177308-0d34-0410-b5e6-96231b3b80d8

commit 466291fd5924c11599be837375214d41ef7f518a
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 7 23:33:52 2009 +0000

    add some more notes.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81170 91177308-0d34-0410-b5e6-96231b3b80d8

commit fda03491a5933cb61d0c6a54edba4fac12b651e2
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 23:04:59 2009 +0000

    Add a testcase for the GlobalOpt inbounds fix.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81168 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3d72cd8e173b1424d6e41eae1494268e457dc718
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 7 22:52:39 2009 +0000

    describe undef semantics in some more detail.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81167 91177308-0d34-0410-b5e6-96231b3b80d8

commit dabbeec685c1fa912aebc208f715ba9ee92a0899
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 22:45:41 2009 +0000

    Add inbounds to these getelementptrs, now that GlobalOpt requires this,
    to preserve the meaning of these tests.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81166 91177308-0d34-0410-b5e6-96231b3b80d8

commit c2723ad812300b525b77334a4180d3531613ae3e
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 22:44:55 2009 +0000

    Don't commit stores with addresses that have indices that are not
    compile-time constant integers or that are out of bounds for their
    corresponding static array types. These can cause aliasing that
    GlobalOpt assumes won't happen.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81165 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9524ee6fbbe252887fc957b2d5612318abed5171
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 22:42:05 2009 +0000

    Don't commit addresses of aggregate values. This avoids problems with
    an aggregate store overlapping a different aggregate store, despite
    the stores having distinct addresses.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81164 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0c834c07335e47546df1d9ef10f79b69cfee7651
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 22:40:13 2009 +0000

    Fix GlobalOpt to avoid committing a store if the address getelementptr
    is missing the inbounds flag. This is slightly conservative, but it
    avoids problems with two constants pointing to the same address but
    getting distinct entries in the Memory DenseMap.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81163 91177308-0d34-0410-b5e6-96231b3b80d8

commit 6d907d00498eaaa2bf0d176adf73f66c0c80d8e8
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 22:34:43 2009 +0000

    Preserve the InBounds flag when evaluating a getelementptr instruction
    into a getelementptr ConstantExpr.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81162 91177308-0d34-0410-b5e6-96231b3b80d8

commit 278fbe6ee2d970a5379dbeb8cf4e55a54e0421d6
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Sep 7 22:31:26 2009 +0000

    Simplify this code by using hasDefinitiveInitializer().

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81161 91177308-0d34-0410-b5e6-96231b3b80d8

commit 706e47f84bb290a91bf2147c9e7f5c77deb6558f
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 7 22:15:23 2009 +0000

    tighten test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81159 91177308-0d34-0410-b5e6-96231b3b80d8

commit 542cd205d82f4d38208ea64aed56c38434381539
Author: Chris Lattner <sabre@nondot.org>
Date:   Mon Sep 7 22:14:41 2009 +0000

    tweak test, add PR#

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81158 91177308-0d34-0410-b5e6-96231b3b80d8

commit 13c337ae0c3af6cadefd022baab370e558c00685
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Mon Sep 7 21:50:24 2009 +0000

    Express this in the canonical way.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81157 91177308-0d34-0410-b5e6-96231b3b80d8

commit f9c2f24ff7c9803f68be9a2dbf53c5157cf77c30
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Mon Sep 7 20:44:51 2009 +0000

    Homogenize whitespace.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81156 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7201b61a736089675ab6bd04bd5fe92d9b42b76d
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 7 19:26:18 2009 +0000

    Use -output-prefix in bugpoint tests so that outputs go in temp directory (and
    we don't race on them).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81155 91177308-0d34-0410-b5e6-96231b3b80d8

commit 377b5a388198dcfdba040b77352c6b4b2c7f577a
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 7 19:26:11 2009 +0000

    Add -output-prefix option to bugpoint (to change the default output name).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81154 91177308-0d34-0410-b5e6-96231b3b80d8

commit 741507d7505493a7b270ba9146f0ed6eeb1a27f8
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 7 19:26:02 2009 +0000

    Don't depend on Tcl behavior of redirecting stderr for all commands in a
    pipeline.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81153 91177308-0d34-0410-b5e6-96231b3b80d8

commit 45983257e95b1350100ed50a1e207eb73db58ac8
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 7 19:25:54 2009 +0000

    Avoid Tcl substitution, introduced %llvmgcc_only for this one little test
    (%llvmgcc includes a '-w' argument, and this test looks for warnings).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81152 91177308-0d34-0410-b5e6-96231b3b80d8

commit 104b3ff2dbe1f6e8f3b06f2027774ea79fca204e
Author: Duncan Sands <baldrick@free.fr>
Date:   Mon Sep 7 05:58:25 2009 +0000

    Using a signal handler that does nothing should be
    equivalent to SIG_IGN.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81144 91177308-0d34-0410-b5e6-96231b3b80d8

commit 6b778fd333ad44d9f1a8c05bc98fd42f5afc5b42
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 7 04:19:02 2009 +0000

    Update unittests for MDNode uniquing disable.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81142 91177308-0d34-0410-b5e6-96231b3b80d8

commit 41160673bbfa67301f5a3768d624a9bed81812b3
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 7 04:05:49 2009 +0000

    Disable MDNode uniquing.
     - Hopefully this unbreaks some llvm-gcc bootstraps.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81141 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1c40a1e0e73319536107388601b864e004cef4ad
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Sep 7 04:03:44 2009 +0000

    Document opt -S argument.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81140 91177308-0d34-0410-b5e6-96231b3b80d8

commit e187ef9ba5db756647acb2aff91123328e8feb38
Author: Eric Christopher <echristo@apple.com>
Date:   Sun Sep 6 22:20:54 2009 +0000

    Fix comment.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81138 91177308-0d34-0410-b5e6-96231b3b80d8

commit 978451f1282a624bc18ae4daf3a1d2a4e32912e1
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Sun Sep 6 20:21:48 2009 +0000

    Do not create calls via PLT in compilation callback - this is higly platform
    dependent. Hopefully, this will fix PR3801.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81132 91177308-0d34-0410-b5e6-96231b3b80d8

commit 65316a37fbf3d14b68a6f6812a429eac9ec82f3f
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 20:02:00 2009 +0000

    Do not try to override non-virtual methods, especially
    when the new method gives the same result as the original
    (as far as I can see).  This will hopefully pacify icc.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81131 91177308-0d34-0410-b5e6-96231b3b80d8

commit 831102e53292a8cd36907a32ec96630bc5819378
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 19:29:07 2009 +0000

    Remove a left over bit of code with no effect.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81128 91177308-0d34-0410-b5e6-96231b3b80d8

commit 00caa72006e1ba4b2897461187fb18c060a36369
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 19:28:38 2009 +0000

    Avoid warnings if assertions are off.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81127 91177308-0d34-0410-b5e6-96231b3b80d8

commit 8297d720b3983c946376e590cfbac5918078a4af
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 19:27:53 2009 +0000

    Remove unreachable code.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81126 91177308-0d34-0410-b5e6-96231b3b80d8

commit 950b9861ba3a7964bc911df9b97fa8d136e0bcd5
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 18:03:32 2009 +0000

    Simplify.  Testing shows that this is not equivalent to BBI = CR.CaseBB + 1.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81124 91177308-0d34-0410-b5e6-96231b3b80d8

commit e0a6add2ae24cc9270fc5c85b16a8836d9278064
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 16:27:34 2009 +0000

    Avoid an unused variable warning when assertions are
    disabled.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81122 91177308-0d34-0410-b5e6-96231b3b80d8

commit fbc8e46ee99c6bc13b4cef2dabea28fa578f6c52
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 13:10:36 2009 +0000

    Change "const static" to "static const", as warned about
    by icc (#82).  Patch by Erick Tryzelaar.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81117 91177308-0d34-0410-b5e6-96231b3b80d8

commit dc94fb91bc0e3dba99c31b3b7f3b8e5048b0e137
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 12:56:52 2009 +0000

    Mark more constants unsigned, as warned about by icc (#68).
    Patch by Erick Tryzelaar.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81116 91177308-0d34-0410-b5e6-96231b3b80d8

commit 05db668fe21feee223e19fe50ddeb6456ddebafb
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 12:41:19 2009 +0000

    Remove some not-really-used variables, as warned
    about by icc (#593, partial).  Patch by Erick Tryzelaar.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81115 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7ac0e8af264c4ab82fb663d342011dfd18d4572d
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Sun Sep 6 12:26:28 2009 +0000

    More MSVC warning fixes:
    1. DUPMAX is defined in regcomp.c, no need to redefine it in regutils.
    2. MSVC doesn't like snprintf, use _snprintf instead.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81114 91177308-0d34-0410-b5e6-96231b3b80d8

commit cd67298c9746bc1e4ac6f730f7d10122f00072c1
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 12:16:26 2009 +0000

    Remove strange 'const' qualifiers, as warned about by icc
    (#411).  Patch by Erick Tryzelaar.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81113 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0db71af6ee5f1ed8495222226db9e4c85eef4805
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Sun Sep 6 12:10:17 2009 +0000

    It's a bool, so treat it like one. Fixes a MSVC warning.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81112 91177308-0d34-0410-b5e6-96231b3b80d8

commit f6e467911587ca54f496958b9e844d566667017b
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 11:45:14 2009 +0000

    Mark constants as unsigned, as pointed out by icc
    warnings (#174).  Patch by Erick Tryzelaar.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81111 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3872b7ec9730d0492e40ab8c279dd8d397d71d42
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 10:53:22 2009 +0000

    Tweak code into an equivalent form for which icc
    doesn't warn about unreachable instructions.  Patch
    by Erick Tryzelaar (#111).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81110 91177308-0d34-0410-b5e6-96231b3b80d8

commit a118e65f108d5222f359ff32d24a27bdcaf27eb1
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Sun Sep 6 09:35:10 2009 +0000

    Fix an integer truncation noticed by MSVC.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81109 91177308-0d34-0410-b5e6-96231b3b80d8

commit defe7950099b9f472d0dc03d621b1c8cd72ecc4d
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Sun Sep 6 09:29:39 2009 +0000

    Remove splint hints to silence warnings from ICC and MSVC.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81108 91177308-0d34-0410-b5e6-96231b3b80d8

commit e0223c296633ecaa5712c129a4cab7a0d6a3a9bf
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 08:55:57 2009 +0000

    Public and private corrections, warned about by icc (#304).
    Patch by Erick Tryzelaar.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81107 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5c3f915679bede35de38a5702359ab5befc38b95
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 08:33:48 2009 +0000

    Remove some unused variables and methods warned about by
    icc (#177, partial).  Patch by Erick Tryzelaar.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81106 91177308-0d34-0410-b5e6-96231b3b80d8

commit bbfc76d44f8db3457b24e4c2fdfe0f7774a815a5
Author: Duncan Sands <baldrick@free.fr>
Date:   Sun Sep 6 07:23:28 2009 +0000

    Remove unneeded declaration, as warned about by
    icc (#1170).  Patch by Erick Tryzelaar.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81104 91177308-0d34-0410-b5e6-96231b3b80d8

commit cb834e9b6313111b17d9d8ee62ffe3cdf75568f8
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 6 02:31:36 2009 +0000

    Fix a possible crash call setIsInBounds.
     - I think there are more instances of this, but I think they are fixed in Dan's
       incoming patch. This one was preventing me from doing a bugpoint reduction
       though.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81103 91177308-0d34-0410-b5e6-96231b3b80d8

commit 610b1c2a518c8aba64f3e0967b7fd5442efce0b7
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 6 02:31:26 2009 +0000

    Simplify, now that gtest supports raw_ostream directly.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81102 91177308-0d34-0410-b5e6-96231b3b80d8

commit ed6987d5e1669a0dec12cb470c38a0340ceabb7d
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Sun Sep 6 02:26:10 2009 +0000

    Revert r80926. It causes loop unswitch assertion and slow down some JIT tests significantly.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81101 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4f3451886cd728c60d38f8eec7b6608acc684cc6
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 6 00:11:24 2009 +0000

    Revert "Include optional subclass flags, such as inbounds, nsw, etc., ...", this
    breaks MiniSAT on x86_64.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81098 91177308-0d34-0410-b5e6-96231b3b80d8

commit b7fb353614ccc2574e85f2f4d972e5b452c0e6ec
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sun Sep 6 00:00:13 2009 +0000

    Fix spacing.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81097 91177308-0d34-0410-b5e6-96231b3b80d8

commit 6fb7ceecb1b05ddf1c78d5be285fcf38499bbcdf
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Sat Sep 5 18:27:40 2009 +0000

    Now that googletest can print ConstantRange, use EXPECT_EQ when testing for
    equality. Prefer EXPECT_EQ(foo, Full) over EXPECT_TRUE(foo.isFullSet()) because
    the former will print out the contents of the constant range that failed.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81094 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2539a0fd5649cc11926e0f8207c871509a064fc0
Author: Jeffrey Yasskin <jyasskin@google.com>
Date:   Sat Sep 5 18:16:17 2009 +0000

    Teach googletest to use raw_ostream instead of just std::ostream.
    This can break when there are implicit conversions from types raw_ostream
    understands but std::ostream doesn't, but it increases the number of cases that
    Just Work.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81093 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3a5a153ce6ed9029a7a27f45b531a434c6139a40
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 5 12:38:44 2009 +0000

    Quote another '%S' in a test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81088 91177308-0d34-0410-b5e6-96231b3b80d8

commit 568d974702d7ebfc70a6dfae1fae5d69ed6b9d7a
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 5 12:38:35 2009 +0000

    Rename %S metavar to %M (clang uses %S for the basename of the test file).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81087 91177308-0d34-0410-b5e6-96231b3b80d8

commit c6af8408bd6fa8a5517b8f282f8f4519ccf1a7d4
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 5 12:38:26 2009 +0000

    Temporary test files should use %t.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81086 91177308-0d34-0410-b5e6-96231b3b80d8

commit f0edd5030da5e7f16bf7ae7728c55205bc2a45e7
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 5 11:53:06 2009 +0000

    Don't depend on arch specific global prefix.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81084 91177308-0d34-0410-b5e6-96231b3b80d8

commit b994d02f07d52dbb7876d2c273a278bf24d7cd22
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 5 11:35:16 2009 +0000

    Eliminate uses of %prcontext.
     - I'd appreciate it if someone else eyeballs my changes to make sure I captured
       the intent of the test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81083 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1a34ea6046da3f1645557e43e90ba92699ced486
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 5 11:34:53 2009 +0000

    opt: Add -S option to print output as LLVM assembly.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81082 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0b4b45c440ef66927923db8c90555f4a84ad1b93
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Sat Sep 5 11:34:46 2009 +0000

    Eliminate some Tclisms.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81081 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2d876ee1f15217f2a537041f8d1e721dc8c20dc3
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Sat Sep 5 08:50:14 2009 +0000

    Delete unused #include.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81076 91177308-0d34-0410-b5e6-96231b3b80d8

commit e509b44f6964be58d9d5204589d0e68b6ed9c432
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Sat Sep 5 01:19:16 2009 +0000

    Stabilize the order of live intervals in the priority_queue used by the
    linear scan reg alloc.  This fixes a problem I ran into where extracting
    a function from a larger file caused the generated code to change (masking
    the problem I was trying to debug) because the allocator behaved differently.

    This changes the results for two X86 regression checks.  stack-color-with-reg
    is improved, with one less instruction, but pr3495 is worse, with one more
    copy.  As far as I can tell, these tests were just getting lucky or unlucky,
    so I've changed the expected results.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81060 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5290ac201f2bd669d8e09cfc45f98b6f39784324
Author: Devang Patel <dpatel@apple.com>
Date:   Sat Sep 5 00:34:14 2009 +0000

    Detect VLAs.
    Do not use DenseMap operator[] because it inserts new entry if lookup fails. Use find() to check an entry in a DenseMap first.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81058 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0c03f0626103c650db38940c5edf806648f6895d
Author: Devang Patel <dpatel@apple.com>
Date:   Fri Sep 4 23:59:07 2009 +0000

    Ignore malformed global variable debug info.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81055 91177308-0d34-0410-b5e6-96231b3b80d8

commit 239b5780eeee253127897d0bcfe0386c483b784d
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Fri Sep 4 22:45:23 2009 +0000

    Prune #includes.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81052 91177308-0d34-0410-b5e6-96231b3b80d8

commit 92469fe6cc59a9f06e4d9f26d0047a6702dec6f3
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Fri Sep 4 22:44:03 2009 +0000

    Remove an unneeded call to c_str().

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81051 91177308-0d34-0410-b5e6-96231b3b80d8

commit 71743a46b89750f45c71aa694c103c86c247c040
Author: Kevin Enderby <enderby@apple.com>
Date:   Fri Sep 4 22:40:31 2009 +0000

    Added AsmToken enum constants to MCAsmLexer.h for '[', ']', '{', and '}' in
    preparation of supporting other targets. Then changed the lexer to parse these
    as tokens.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81050 91177308-0d34-0410-b5e6-96231b3b80d8

commit 685689cae6703e4ca9fce5805b44e99ca8047d4e
Author: Kevin Enderby <enderby@apple.com>
Date:   Fri Sep 4 21:45:34 2009 +0000

    Added the AsmToken::Hash enum constant to MCAsmLexer.h in preparation of
    supporting other targets.  Changed the code to pass MCAsmInfo to the parser
    and the lexer.  Then changed the lexer to use CommentString from MCAsmInfo
    instead of a literal '#' character.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81046 91177308-0d34-0410-b5e6-96231b3b80d8

commit 08fe10526f25d21437fd484b007a6ab772ef794d
Author: Devang Patel <dpatel@apple.com>
Date:   Fri Sep 4 21:32:05 2009 +0000

    While replacing an MDNode elment, properly update MDNode's operand list.
    MDNode's operand list does not include all elements.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81045 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1573308b6dd6e548c3ac70d740579db0fb086c67
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Fri Sep 4 21:22:04 2009 +0000

    Prevent warnings on compilers for which its not clear that assert won't return.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81044 91177308-0d34-0410-b5e6-96231b3b80d8

commit 056fc97aaab9f2ae097ee243175fb21a871b5462
Author: Lang Hames <lhames@gmail.com>
Date:   Fri Sep 4 21:03:07 2009 +0000

    Removed yet another std::ostream reference.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81042 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5cd57b09b71bd03b36c5d64707d50d05ca34618c
Author: Lang Hames <lhames@gmail.com>
Date:   Fri Sep 4 20:54:51 2009 +0000

    Removed some junk and a std::ostream operator that was hanging around.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81041 91177308-0d34-0410-b5e6-96231b3b80d8

commit d8f309943c6c05daa9e23f7bcb08cf5c18eb4a26
Author: Lang Hames <lhames@gmail.com>
Date:   Fri Sep 4 20:41:11 2009 +0000

    Replaces uses of unsigned for indexes in LiveInterval and VNInfo with
    a new class, MachineInstrIndex, which hides arithmetic details from
    most clients. This is a step towards allowing the register allocator
    to update/insert code during allocation.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81040 91177308-0d34-0410-b5e6-96231b3b80d8

commit d98806736fb1505ccad81879fdddb2cbd0ab4880
Author: Dale Johannesen <dalej@apple.com>
Date:   Fri Sep 4 20:19:09 2009 +0000

    Test for llvm-gcc commit 81037.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81038 91177308-0d34-0410-b5e6-96231b3b80d8

commit 19da904e44d1f35af13c72f0fc3bdd9ec3a0ba73
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Fri Sep 4 17:21:59 2009 +0000

    Updated tests to use ProfileVerifer to test ProfileLoader and ProfileEstimator.
    (Keep disabled test disabled until selfhosted build issue is resolved.)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81008 91177308-0d34-0410-b5e6-96231b3b80d8

commit c2ae05a1c31ecc161fa2ddfec4d1ce8a7fc5c2eb
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Fri Sep 4 17:15:10 2009 +0000

    Cleaned up ProfileVerifierPass.
    (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086219.html)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81007 91177308-0d34-0410-b5e6-96231b3b80d8

commit 68eca1aeb53324309e2cc7ec68a91423ec2e41e3
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Fri Sep 4 12:34:44 2009 +0000

    Converted MaximumSpanningTree algorithm to a generic template, this could go
    into llvm/ADT.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81001 91177308-0d34-0410-b5e6-96231b3b80d8

commit 99da1c065b2d6e4c4a175ec585b7e24f0f8f453a
Author: Dan Gohman <gohman@apple.com>
Date:   Fri Sep 4 12:08:11 2009 +0000

    Include optional subclass flags, such as inbounds, nsw, etc., in the
    Constant uniquing tables. This allows distinct ConstantExpr objects
    with the same operation and different flags.

    Even though a ConstantExpr "a + b" is either always overflowing or
    never overflowing (due to being a ConstantExpr), it's still necessary
    to be able to represent it both with and without overflow flags at
    the same time within the IR, because the safety of the flag may
    depend on the context of the use. If the constant really does overflow,
    it wouldn't ever be safe to use with the flag set, however the use
    may be in code that is never actually executed.

    This also makes it possible to merge all the flags tests into a single test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80998 91177308-0d34-0410-b5e6-96231b3b80d8

commit 680c2a0652497c5b9b550a147c96e506facb854b
Author: Duncan Sands <baldrick@free.fr>
Date:   Fri Sep 4 11:59:43 2009 +0000

    Use delete[] to match new[] (found by valgrind).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80997 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9dcb760ccdb1e1418afe31c42e6b26d663b00cbf
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 4 07:47:40 2009 +0000

    Run branch folding if if-converter make some transformations.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80994 91177308-0d34-0410-b5e6-96231b3b80d8

commit 368ddcb5b8995476324018aed319e36085de3411
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Fri Sep 4 07:46:30 2009 +0000

    Fix comment for consistency sake.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80993 91177308-0d34-0410-b5e6-96231b3b80d8

commit 02d88831d19f9f0a81518af2db01e206aaa26473
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 4 05:07:52 2009 +0000

    Remove stale greps.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80986 91177308-0d34-0410-b5e6-96231b3b80d8

commit b273bb5cd6ff131f608ec09f581d7db23d8cb530
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Fri Sep 4 05:07:44 2009 +0000

    Update lib deps.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80985 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5d7babb3ed71916bf46f347d4ff0e0ea2a809c15
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Fri Sep 4 04:07:19 2009 +0000

    Convert tests to FileCheck.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80983 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9c2ed5cff22b49e07be176f3d4830b5bc67739c6
Author: Jim Grosbach <grosbach@apple.com>
Date:   Fri Sep 4 01:38:51 2009 +0000

    Whitespace cleanup

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80978 91177308-0d34-0410-b5e6-96231b3b80d8

commit 24fd31656faf1f70c5e4ade5b6462b2e66465748
Author: Eric Christopher <echristo@apple.com>
Date:   Fri Sep 4 01:14:14 2009 +0000

    If there's a calling convention attach it to the rewind function call.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80976 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4d47c5af7087d582a2ae89641051543689e2026b
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Fri Sep 4 00:32:31 2009 +0000

    Convert a test to FileCheck.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80975 91177308-0d34-0410-b5e6-96231b3b80d8

commit fe0a279423e23454b9f41d59d2a86340fdceb8a8
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 3 23:54:22 2009 +0000

    Funky indentation.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80971 91177308-0d34-0410-b5e6-96231b3b80d8

commit 146162cd340e559a31b8a3e3f67d358587a0f985
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 23:40:10 2009 +0000

    Revert "--- Reverse-merging r80908 into '.':", I already "fixed" this.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80970 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1046e41998ac9178d87226cb0869612c22f5c6d1
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 23:34:49 2009 +0000

    Revert 80959. It isn't sufficient to solve the full problem. And it
    introduced regressions in the Ocaml bindings tests.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80969 91177308-0d34-0410-b5e6-96231b3b80d8

commit c527d7e5a814b834aaece6e67d2447b9d2d2be5e
Author: Erick Tryzelaar <idadesub@users.sourceforge.net>
Date:   Thu Sep 3 23:27:31 2009 +0000

    Replace ocamlc tests with ocamlopt tests since they're less noisy.

    There's a bug with ocamlc that uses "char*" instead of "const char*" for
    global string variables. This causes g++ to be very noisy when linking
    ocamlc programs. That's why the ocaml test used to cat to /dev/null.
    ocamlopt doesn't have this problem, so we can get rid of the >/dev/null,
    which may obscure some problems.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80968 91177308-0d34-0410-b5e6-96231b3b80d8

commit e76bfd9f87d7255a4f0940e3a5f911e22cba7f6c
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 3 23:13:46 2009 +0000

    --- Reverse-merging r80908 into '.':
    D    test/Analysis/Profiling

    --- Reverse-merging r80907 into '.':
    U    lib/Analysis/ProfileInfoLoaderPass.cpp

    Attempt to remove failure in the self-hosting build bot.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80966 91177308-0d34-0410-b5e6-96231b3b80d8

commit f3ff0b0ad79a27cbcfbfa456ae031b310bd64d63
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 22:57:02 2009 +0000

    Add test for PR4873, which works for me.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80965 91177308-0d34-0410-b5e6-96231b3b80d8

commit f154271b8e81b6fc65137b7fda7c935b9fe93203
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 22:53:57 2009 +0000

    LLVM currently represents floating-point negation as -0.0 - x. Fix
    FastISel to recognize this pattern and emit a floating-point
    negation using xor.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80963 91177308-0d34-0410-b5e6-96231b3b80d8

commit 598ea31a7440ad0fae45e9fd4d7d640c431ef030
Author: David Goodwin <david_goodwin@apple.com>
Date:   Thu Sep 3 22:48:51 2009 +0000

    Don't crash when target has no itineraries.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80962 91177308-0d34-0410-b5e6-96231b3b80d8

commit c9ca26dded387110e8c7520f52bd635eb483d1ec
Author: Bill Wendling <isanbard@gmail.com>
Date:   Thu Sep 3 22:19:22 2009 +0000

    If we've pushed registers onto the stack, but aren't adjusting the stack pointer
    (i.e., there are no local variables and stuff), we still need to output FDE
    information for the pushed registers.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80960 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2f2ab4797b28ede081fda36855a26e8ec1b9357e
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 22:17:40 2009 +0000

    Remove the API for creating ConstantExprs with the nsw, nuw, inbounds,
    and exact flags. Because ConstantExprs are uniqued, creating an
    expression with this flag causes all expressions with the same operands
    to have the same flag, which may not be safe. Add, sub, mul, and sdiv
    ConstantExprs are usually folded anyway, so the main interesting flag
    here is inbounds, and the constant folder already knows how to set the
    inbounds flag automatically in most cases, so there isn't an urgent need
    for the API support.

    This can be reconsidered in the future, but for now just removing these
    API bits eliminates a source of potential trouble with little downside.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80959 91177308-0d34-0410-b5e6-96231b3b80d8

commit 856b38c3e9341ed6667788eb3c923be358ac5b71
Author: David Goodwin <david_goodwin@apple.com>
Date:   Thu Sep 3 22:15:25 2009 +0000

    Create our own block initializer for kill fixups as the scheduling one wasn't doing the right thing.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80958 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3d88e9179113826d90cfe1653b8497e59798858b
Author: David Goodwin <david_goodwin@apple.com>
Date:   Thu Sep 3 22:12:28 2009 +0000

    Calls clobber FPSCR.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80956 91177308-0d34-0410-b5e6-96231b3b80d8

commit 637600a68adadef8e2f835a18a1193c6f8a1f0b5
Author: Ted Kremenek <kremenek@apple.com>
Date:   Thu Sep 3 22:07:30 2009 +0000

    Make ImmutableMap/ImmutableSet quicker by only canonicalizing the tree after an
    Add or Remove operation complete, and not while building the intermediate tree.
    This trades a little bit more memory usage for less accesses to the FoldingSet.  On a benchmark for the clang static analyzer, this shaves off another 13% of execution time when using field/array sensitivity.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80955 91177308-0d34-0410-b5e6-96231b3b80d8

commit bb45a492cfcb01b632213cf5e88f839f2ffb7a68
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 21:09:53 2009 +0000

    Disable some parts of the profiling-tool-chain test, which is currently failing
    on a self-hosted build (although it seems to work on non-self hosted). I'll work
    with Andreas to figure this out.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80947 91177308-0d34-0410-b5e6-96231b3b80d8

commit c653c95f431b4526287d26cb7b5c16860d61ab0a
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 20:59:02 2009 +0000

    Remove dead greps.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80946 91177308-0d34-0410-b5e6-96231b3b80d8

commit fa196cc6a40c2f1146f336ee904688ab37d9ac0e
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Thu Sep 3 20:58:42 2009 +0000

    Overhaul the TwoAddressInstructionPass to simplify the logic, especially
    for the complicated case where one register is tied to multiple destinations.
    This avoids the extra scan of instruction operands that was introduced by
    my recent change.  I also pulled some code out into a separate
    TryInstructionTransform method, added more comments, and renamed some
    variables.

    Besides all those changes, this takes care of a FIXME in the code regarding
    an assumption about there being a single tied use of a register when
    converting to a 3-address form.  I'm not aware of cases where that assumption
    is violated, but the code now only attempts to transform an instruction,
    either by commuting its operands or by converting to a 3-address form,
    for the simple case where there is a single pair of tied operands.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80945 91177308-0d34-0410-b5e6-96231b3b80d8

commit ff6a63a57697e8f76e9188b34bc75486528e04ba
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 20:36:13 2009 +0000

    Smallvectorize switchExitBlocks.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80942 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9f876cd88bcf8204ec52dfb03a474a154ad60617
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Sep 3 20:35:57 2009 +0000

    There is not any need to copy metadata while merging modules.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80941 91177308-0d34-0410-b5e6-96231b3b80d8

commit 41b3f4abc695b3ce178e1db7610b34d3745ed22d
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 20:34:31 2009 +0000

    Recognize more opportunities to use SSE min and max instructions,
    swapping the operands if necessary.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80940 91177308-0d34-0410-b5e6-96231b3b80d8

commit bc3c526a5b0a6c97231ab1af117053fc2c89c491
Author: Mon P Wang <wangmp@apple.com>
Date:   Thu Sep 3 19:57:35 2009 +0000

    Test cases for vector shifts changes r80935
    Changed the old vector shift test to use FileCheck

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80936 91177308-0d34-0410-b5e6-96231b3b80d8

commit 04c767e3a81142583c41927d68387f8663cda8e8
Author: Mon P Wang <wangmp@apple.com>
Date:   Thu Sep 3 19:56:25 2009 +0000

    Fixed a few problems with vector shifts
      - when transforming a vector shift of a non-immediate scalar shift amount, zero
        extend the i32 shift amount to i64 since the vector shift reads 64 bits
      - when transforming i16 vectors to use a vector shift, zero extend i16 shift amount
      - improve the code quality in some cases when transforming vectors to use a vector shift

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80935 91177308-0d34-0410-b5e6-96231b3b80d8

commit e84197bc92efd8ee0a1ac63324783d6fcaf0ffd7
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 17:18:51 2009 +0000

    Add a -disable-16bit flag and associated support for experimenting with
    disabling the use of 16-bit operations on x86. This doesn't yet work for
    inline asms with 16-bit constraints, vectors with 16-bit elements,
    trampoline code, and perhaps other obscurities, but it's enough to try
    some experiments.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80930 91177308-0d34-0410-b5e6-96231b3b80d8

commit e71842bebb922af77f158cf2bb577575b51a4219
Author: Kevin Enderby <enderby@apple.com>
Date:   Thu Sep 3 17:15:07 2009 +0000

    Removed the non-target independent AsmToken::Register enum constant
    from MCAsmLexer.h in preparation of supporting other targets.  Changed the
    X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking
    for AsmToken::Percent when parsing in places that used AsmToken::Register.
    Then changed X86ATTAsmParser::ParseRegister to parse out registers as an
    AsmToken::Percent followed by an AsmToken::Identifier.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80929 91177308-0d34-0410-b5e6-96231b3b80d8

commit fb4fa6f860001c6f6663a5c782fae0fa0e83717b
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Sep 3 17:03:47 2009 +0000

    Use WeakVH to hold dead mdnodes. Check use_empty() before deleting a node.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80928 91177308-0d34-0410-b5e6-96231b3b80d8

commit 024ec13192dc9720da09edad698851bddf699c70
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 16:32:58 2009 +0000

    Make bugpoint use ParseIRFile instead of doing the same thing manually.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80927 91177308-0d34-0410-b5e6-96231b3b80d8

commit da313a3723d8fa74893b2b902719daf1b0021e67
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 16:31:42 2009 +0000

    Add a verifyAnalysis to LoopInfo, LoopSimplify, and LCSSA form that verify
    that these passes are properly preserved.

    Fix several transformation passes that claimed to preserve LoopSimplify
    form but weren't.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80926 91177308-0d34-0410-b5e6-96231b3b80d8

commit bad01c4020d7f8048903b13ad2457323f5ab0359
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 16:11:53 2009 +0000

    Remove some unnecessary -f options.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80924 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5c42c875f7b8a18b3f3945bf52bbab2fa59450c3
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 16:10:48 2009 +0000

    Move getUniqueExitBlocks from LoopBase to Loop, since they depend on
    LoopSimplify form, which is currently only available on Loops (and
    not MachineLoops). Also, move the code out of the header file.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80923 91177308-0d34-0410-b5e6-96231b3b80d8

commit fb17470d7382d820c535988315c65da4e9de0b48
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 16:00:08 2009 +0000

    Use IRReader.h in opt, to support reading of LLVM Assembly files directly.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80922 91177308-0d34-0410-b5e6-96231b3b80d8

commit 798e541fbdd6cdc2da6e6f153b3704d350bd3167
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 15:34:35 2009 +0000

    Change PHINode::hasConstantValue to have a DominatorTree argument
    instead of a bool argument, and to do the dominator check itself.
    This makes it eaiser to use when DominatorTree information is
    available.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80920 91177308-0d34-0410-b5e6-96231b3b80d8

commit 242b4738d28335a58e08db01c2748d0488885348
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 15:09:24 2009 +0000

    Don't try to verify a LoopPass analysis if the loop has been deleted.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80919 91177308-0d34-0410-b5e6-96231b3b80d8

commit f925d7f97fdec5c23250d06d3f93ab41f58afb3f
Author: Dan Gohman <gohman@apple.com>
Date:   Thu Sep 3 15:00:26 2009 +0000

    Remove references to expression "handles", which are no longer used.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80918 91177308-0d34-0410-b5e6-96231b3b80d8

commit d809156d5c860a90cf7b1a8dfb9db62dcc5e6f06
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Thu Sep 3 14:58:24 2009 +0000

    CppBackend: avoid printing unnecessary whitespace.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80917 91177308-0d34-0410-b5e6-96231b3b80d8

commit c50fa7ec0a396461d9addda9b078560e0a7d0e41
Author: Duncan Sands <baldrick@free.fr>
Date:   Thu Sep 3 13:37:16 2009 +0000

    Keep track of how many memmove calls were turned into
    memcpy calls.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80915 91177308-0d34-0410-b5e6-96231b3b80d8

commit 551c462cc936f64e1462b7a973e54e340ae657a4
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Thu Sep 3 09:11:10 2009 +0000

    Fix build warning.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80912 91177308-0d34-0410-b5e6-96231b3b80d8

commit 34dd111c5c8a54d2b512999eb5179d42a746cf30
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Thu Sep 3 08:52:52 2009 +0000

    Code Cleanup.

    Removed inverted flag form MaximumSpanningTree, also do not handle so much
    information to MaximumSpanningTree.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80911 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3b8513dd94dfd5246166b2762638c05bb5b3a01a
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 08:41:19 2009 +0000

    Filter out -fno-rtti from CXXFLAGS as well (in an expensive checks build).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80910 91177308-0d34-0410-b5e6-96231b3b80d8

commit 36079a8ecc6c65b737304e18dce9c336704a0200
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Thu Sep 3 08:41:05 2009 +0000

    Code Cleanup.
    (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086139.html)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80909 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2b503ff0f62f1359cfc0f35ad36a376296c43b32
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 07:38:00 2009 +0000

    Reapply profiling tests.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80908 91177308-0d34-0410-b5e6-96231b3b80d8

commit df7d5b1736f8fc99a8f5bedcd96559d099793d92
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 07:37:42 2009 +0000

    Remove undefined behavior when loading optimal edge profile info.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80907 91177308-0d34-0410-b5e6-96231b3b80d8

commit b55972f828465055a2e144cf74733abad3132534
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 07:36:42 2009 +0000

    don't call getOffset() on jump tables, this fixes three failing olden benchmarks
    with the new asmprinter.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80906 91177308-0d34-0410-b5e6-96231b3b80d8

commit 02c96d78837bceaecb699bbd4e404403f8188c14
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 07:30:56 2009 +0000

    Implement support for X86II::MO_GOT_ABSOLUTE_ADDRESS.  We get very
    different formatting from the old asmprinter, but it should be
    semantically the same.  We used to get:

    	popl	%eax
    	addl	$_GLOBAL_OFFSET_TABLE_ + [.-.Lllvm$6.$piclabel], %eax
    ...

    Now we get:

    	popl	%eax
    .Lpicbaseref6:
    	addl	$(_GLOBAL_OFFSET_TABLE_ + (.Lpicbaseref6 - .Lllvm$6.$piclabel)), %eax
    ...

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80905 91177308-0d34-0410-b5e6-96231b3b80d8

commit ba2cf3d635dcc68ac416f56b767fd79d77ea7c83
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 3 07:04:02 2009 +0000

    Reference to hidden symbols do not have to go through non-lazy pointer in non-pic mode. rdar://7187172.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80904 91177308-0d34-0410-b5e6-96231b3b80d8

commit 04791af064e508422996148f33ef1f5f48c29e5b
Author: Nick Lewycky <nicholas@mxc.ca>
Date:   Thu Sep 3 06:43:15 2009 +0000

    Remove VISIBILITY_HIDDEN from this file.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80903 91177308-0d34-0410-b5e6-96231b3b80d8

commit 93d228067020d3f32f6b45799ad394fa34b9b160
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 06:29:23 2009 +0000

    merge all the basic linux/32 pic tests together into one test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80902 91177308-0d34-0410-b5e6-96231b3b80d8

commit c420c6c39eae9503d0a3054400fc5615b02bbf1c
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 06:16:49 2009 +0000

    rename test

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80901 91177308-0d34-0410-b5e6-96231b3b80d8

commit 53d76257db225c1ecc3de84096aae77c4493a962
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 06:15:11 2009 +0000

    use a darwin triple

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80900 91177308-0d34-0410-b5e6-96231b3b80d8

commit c13d5b47266168db627ade3cf5a4157d61949af0
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 06:13:54 2009 +0000

    TAI -> MAI

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80899 91177308-0d34-0410-b5e6-96231b3b80d8

commit fba9e5022d361fa9d772c6b00881c8f1478f09ae
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 06:13:45 2009 +0000

    adjust expected lines.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80898 91177308-0d34-0410-b5e6-96231b3b80d8

commit c5b06e6b2786ec34435e46720ba44a909193c018
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 06:00:00 2009 +0000

    improve comments.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80897 91177308-0d34-0410-b5e6-96231b3b80d8

commit 648353a52f524287325e5f5af31aa88f40ed0f76
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 05:57:47 2009 +0000

    fix MCSymbol printing to exactly match the normal mangler rules so
    we can diff .s files.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80894 91177308-0d34-0410-b5e6-96231b3b80d8

commit 90c1949efa972a6078654f6b766ff6b7808b3798
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 05:54:00 2009 +0000

    remove extraneous hack.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80893 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9cc58801a61ba37f4a90b6093ced685fa0197ff6
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 05:47:34 2009 +0000

    Make these functions static and local.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80892 91177308-0d34-0410-b5e6-96231b3b80d8

commit 43ba45cb0f893fd58a0a9f4e80bc455f36b6e46d
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 05:47:22 2009 +0000

    Tweak comment.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80891 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0fe3a1ed4567dfdd45125c95beed6c6b77be2088
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 05:46:51 2009 +0000

    Thread an MCAsmInfo pointer through the various MC printing APIs,
    and fix a few things using << on MCSymbols to use ->print(). No
    functionality change other than unbreaking my previous patch.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80890 91177308-0d34-0410-b5e6-96231b3b80d8

commit ad1950e0138c65a6e0d329055b4f60402bc36cbb
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 05:39:09 2009 +0000

    just use dump()

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80889 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7c75f8d66dd9d6a2ff443ab2fbe16c4d30a8ea1e
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 05:33:01 2009 +0000

    inline insertion operators.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80888 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2342099f65d7f45542126efa911117c0099a4f5d
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 05:19:59 2009 +0000

    In C++, code is not allowed to call main.  In C it is, this
    simplifylibcalls optimization is thus valid for C++ but not C.
    It's not important enough to worry about for C++ apps, so just
    remove it.

    rdar://7191924

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80887 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3dccf61c7f1d8dbb338f4c0afa20408f53a095c8
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 05:06:07 2009 +0000

    merge globaladdress symbol processing stuff into other stuff.  Now
    all global variable operand flag processing stuff is shared between
    different operand types.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80886 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2b6365ff99c7c321926f0c5b46536665a97f8676
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 3 05:01:00 2009 +0000

    Unbreak x86_64 build.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80885 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5750f44c1063978fa51a46362c8c6a1c52445817
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 04:56:20 2009 +0000

    Split the "operand -> symbol" logic from the "get offset and other munging
    from operand" logic.  GlobalAddress still todo.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80884 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9fb70d6e3120d738d14e0b8fa26e3e492cba6e5a
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 04:44:53 2009 +0000

    implement lowering support for constant pool index operands, this gets a bunch more
    olden programs working.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80881 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5746a94642c6f34c8476fd113ad7913c27a5bc38
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Thu Sep 3 04:37:05 2009 +0000

    X86JITInfo::getLazyResolverFunction() should not read cpu id to determine whether sse is available. Just use consult subtarget.

    No functionality changes.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80880 91177308-0d34-0410-b5e6-96231b3b80d8

commit bc699fcbd21999eeee0e6659b6aee4f7a9d8c8ec
Author: Ted Kremenek <kremenek@apple.com>
Date:   Thu Sep 3 04:21:34 2009 +0000

    Set the 'cached digest' flag after computing the digest for an
    ImutAVLTree.  This was accidentally left out, and essentially caused
    digest caching to be ignored in ImmutableMap and ImmutableSet (this
    bug was detected from shark traces that showed ComputeDigest was in
    the hot path in the clang static analyzer).

    This reduces the running time of the clang static analyzer on an
    example benchmark by ~32% for both RegionStore (field-sensitivty) and
    BasicStore (without field-sensitivity).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80877 91177308-0d34-0410-b5e6-96231b3b80d8

commit 613e05408626a631c011a3f141eff2d6eea9f1f2
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 04:03:44 2009 +0000

    update test for alignment value in hex

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80876 91177308-0d34-0410-b5e6-96231b3b80d8

commit 27f44adc3b16ead29795d1a06e6be88d8de21471
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 04:01:10 2009 +0000

    output alignment value in hex so that we get:
      .align 3, 0x90
    instead of,
      .align 3, 144

    suggested by eric.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80875 91177308-0d34-0410-b5e6-96231b3b80d8

commit 862164990329cfcc3dc83d595cb8304913f1218d
Author: Chris Lattner <sabre@nondot.org>
Date:   Thu Sep 3 03:54:02 2009 +0000

    simplify this by using SmallString::str(), much nicer!

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80874 91177308-0d34-0410-b5e6-96231b3b80d8

commit e86b0df8fc92fdeb05d03897afe4802ee5108dae
Author: Lang Hames <lhames@gmail.com>
Date:   Thu Sep 3 02:52:02 2009 +0000

    Fixed a test that ensures the LocalRewriter does not attempt to
    avoid reloads by reusing clobbered registers.

    This was causing issues in 256.bzip2 when compiled with PIC for
    a while (starting at r78217), though the problem has since been masked.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80872 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5a6b6b43459b875e88d598c232ddef7b805fe107
Author: Gabor Greif <ggreif@gmail.com>
Date:   Thu Sep 3 02:02:59 2009 +0000

    back out my recent commit (r80858), it seems to break self-hosting buildbot's stage 2 configure

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80871 91177308-0d34-0410-b5e6-96231b3b80d8

commit f0cb8b7ce425011e4caedfb841fdfc0aa38e6cff
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Sep 3 01:39:20 2009 +0000

    Now Bitcode reader bug is fixed. Reapply 80839.

    Use CallbackVH, instead of WeakVH, to hold MDNode elements.
    Use FoldingSetNode to unique MDNodes in a context.
    Use CallbackVH hooks to update context's MDNodeSet appropriately.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80868 91177308-0d34-0410-b5e6-96231b3b80d8

commit deda3956ac6e8af372398bd9f4fd64c9cdf02711
Author: Devang Patel <dpatel@apple.com>
Date:   Thu Sep 3 01:38:02 2009 +0000

    Add new value for given index in MDValuePtrs.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80867 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1e48cf651240e745819e2cbf5cd837b4c24141b1
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Thu Sep 3 01:10:13 2009 +0000

    Improve llvm::getHostTriple for some cases where the LLVM_HOSTTRIPLE is not
    reliable.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80863 91177308-0d34-0410-b5e6-96231b3b80d8

commit fe15ce4a51f0d83bd2a0bb788af70663fc8713aa
Author: Gabor Greif <ggreif@gmail.com>
Date:   Thu Sep 3 00:18:58 2009 +0000

    re-commit r66920 (which has been backed out in r66953) I may have more luck this time. I'll back out if needed...

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80858 91177308-0d34-0410-b5e6-96231b3b80d8

commit 66fdfa0595d378249f8ff71168d0fe923a828b9a
Author: Sean Callanan <scallanan@apple.com>
Date:   Thu Sep 3 00:04:47 2009 +0000

    Added opaque 32-, 48-, and 80-bit memory operand types to the X86
    instruction tables to support segmented addressing (and other objects
    of obscure type).
    Modified the X86 assembly printers to handle these new operand types.
    Added JMP and CALL instructions that use segmented addresses.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80857 91177308-0d34-0410-b5e6-96231b3b80d8

commit 401011eae07426d5669af7c96bb06e92cff60cfe
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Wed Sep 2 23:52:38 2009 +0000

    Show derived host triple in --version.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80855 91177308-0d34-0410-b5e6-96231b3b80d8

commit eba47222d28036cebbd582e4dc84fefa3f76de49
Author: Shantonu Sen <ssen@apple.com>
Date:   Wed Sep 2 23:52:23 2009 +0000

    Improve support for cross-hosted builds of LLVM.
    --build=triple and other configure options are passed
    to the BuildTools/ sub-invocation more consistently

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80854 91177308-0d34-0410-b5e6-96231b3b80d8

commit 66284fca05a7b78636f9f99a14bddf2e16f4f570
Author: Douglas Gregor <doug.gregor@gmail.com>
Date:   Wed Sep 2 22:45:31 2009 +0000

    Unbreak my CMake build. Say you'll link again.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80842 91177308-0d34-0410-b5e6-96231b3b80d8

commit 03ebfa2ba332dcf86a3233b11397f6699c6ac157
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 2 21:49:26 2009 +0000

    Revert 80839 for now. It causes test failures.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80841 91177308-0d34-0410-b5e6-96231b3b80d8

commit 22d00c4b5b0845531feead561116ede02a7354b9
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 2 21:22:09 2009 +0000

    Use CallbackVH, instead of WeakVH, to hold MDNode elements.
    Use FoldingSetNode to unique MDNodes in a context.
    Use CallbackVH hooks to update context's MDNodeSet appropriately.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80839 91177308-0d34-0410-b5e6-96231b3b80d8

commit b261a1986acd86bb414d8e9e190a4e15742efc44
Author: Anton Korobeynikov <asl@math.spbu.ru>
Date:   Wed Sep 2 21:21:28 2009 +0000

    More missed vdup patterns

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80838 91177308-0d34-0410-b5e6-96231b3b80d8

commit 22f2b1c131b207894d8167b516b11aa4c0776e90
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 2 19:35:19 2009 +0000

    Switch llc from ParseBitcodeFile to ParseIRFile. This lets llc
    transparently read either LLVM Assembly or LLVM Bitcode files.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80829 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1bbc7078b1f3d61b52af07ff6ab8344c26d179a6
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 2 19:21:56 2009 +0000

    Add a comment noting the memory ownership rules.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80827 91177308-0d34-0410-b5e6-96231b3b80d8

commit 56747f2521918e90a939a2db2d8c8e88f9688b89
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 2 17:54:06 2009 +0000

    Add convenience functions for reading in LLVM IR that autodetect
    and LLVM Assembly and LLVM Bitcode and automatically call the
    corresponding reader.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80809 91177308-0d34-0410-b5e6-96231b3b80d8

commit b8f1df36008dbe45eb80c218979020088c800283
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 17:37:38 2009 +0000

    switch from std::string to SmallString + raw_svector_ostream.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80807 91177308-0d34-0410-b5e6-96231b3b80d8

commit b16f72e48e2ca32c5e795f7f302c1a7448c56b19
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 17:35:12 2009 +0000

    split mcinst lowering stuff out to its own file.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80806 91177308-0d34-0410-b5e6-96231b3b80d8

commit b3b034848455f9961fd34ec9cb6108095c8302cf
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 2 17:31:42 2009 +0000

    Fix the syntax of add/sub/mul nsw/nuw and sdiv exact.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80805 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0f603892701d4630990e7a552354c8cf2b6374dd
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 2 17:21:29 2009 +0000

    Add const qualifiers for isBitcodeWrapper, and add new functions
    isRawBitcode and isBitcode to allow clients to test whether a given
    memory buffer holds a bitcode image.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80804 91177308-0d34-0410-b5e6-96231b3b80d8

commit 18721d0596e31317458834d4d6bb0cbdd9d9a332
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 2 17:18:19 2009 +0000

    Refactor common code from ParseAssemblyString and ParseAssemblyFile,
    to expose a low-level interface for parsing from an existing MemoryBuffer.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80803 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5c7b1d9dd31abf15bdeb32ec2dd09b666114da7e
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 2 17:05:05 2009 +0000

    Add const qualifiers to dominates' arguments.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80801 91177308-0d34-0410-b5e6-96231b3b80d8

commit c53892f60f8828b82695fff8895223bf6abdc1a4
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 2 16:47:24 2009 +0000

    Removed temporarily because of breaking Darwin builds.
    (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090831/086214.html)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80799 91177308-0d34-0410-b5e6-96231b3b80d8

commit fa2d3271d5e771007cf55840bb4eae119c02818c
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Wed Sep 2 16:35:35 2009 +0000

    Rearrange code to eliminate redundancy and avoid gotos.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80798 91177308-0d34-0410-b5e6-96231b3b80d8

commit 58837339ac130fbb4a0d1c6456584d7b6d933b71
Author: Nuno Lopes <nunoplopes@sapo.pt>
Date:   Wed Sep 2 15:02:57 2009 +0000

    plug another leak in LLParser::PerFunctionState::SetInstName()

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80792 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2c6e434dc05bbb5cf3eac56dce1ad05d6c97e77f
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 2 14:24:08 2009 +0000

    Changed profiling-tool-chain.ll test to use optimal-edge-profiling instead of
    edge-profiling, this is more useful since the loading of the
    optimal-edge-profiling is more complicated.
    The edge-profiling is tested in edge-profiling.ll where only the
    instrumentation is tested.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80791 91177308-0d34-0410-b5e6-96231b3b80d8

commit f50aecf1cc4ff2b3272d1f4ed6c1783220152875
Author: Nuno Lopes <nunoplopes@sapo.pt>
Date:   Wed Sep 2 14:22:03 2009 +0000

    plug memory leak in LLParser::PerFunctionState::SetInstName() by deleting a value after replacing it

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80790 91177308-0d34-0410-b5e6-96231b3b80d8

commit 46ef7bea5c421a06f05d376742413c18d82e35f6
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 2 14:03:11 2009 +0000

    Sort edges in MaximumSpanningTree more stable in case of equal weight.
    (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090824/085890.html)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80789 91177308-0d34-0410-b5e6-96231b3b80d8

commit f73818861a527851de1f63c34803548dc4844416
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 2 13:59:05 2009 +0000

    Changed set of BlocksToInstrument to set of InsertedBlocks that do not have to
    be instrumented.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80788 91177308-0d34-0410-b5e6-96231b3b80d8

commit 98004cce823f3ae209052fb1229d516dfc0b22df
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Wed Sep 2 12:38:39 2009 +0000

    Code cleanups and added comments.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80781 91177308-0d34-0410-b5e6-96231b3b80d8

commit b65febdbf1a37695e2dea5cee9e5dca9e181fb14
Author: Edwin Török <edwintorok@gmail.com>
Date:   Wed Sep 2 12:23:05 2009 +0000

    Opaque types didn't work if llvm_is_multithreaded().
    AlwaysOpaqueTy is always NULL at this point, and it causes an assertion failure.
    Fix it by using the just constructed tmp instead.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80780 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1298be5a7cc8edb31e1e825a7ddbc755a39bf2f0
Author: Nuno Lopes <nunoplopes@sapo.pt>
Date:   Wed Sep 2 11:58:01 2009 +0000

    set svn:ignore

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80779 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0aebd0cd8b56b87682114d314e77f13a5920f9db
Author: Edwin Török <edwintorok@gmail.com>
Date:   Wed Sep 2 11:13:56 2009 +0000

    Fix DbgStopPointInst->getFileName/getDirectory, broken by the MDNodification in
    r80406, and readd a -print-dbginfo test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80778 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5838baa4a8aedfd453a5b0663425979c77e4e285
Author: Sandeep Patel <deeppatel1987@gmail.com>
Date:   Wed Sep 2 08:44:58 2009 +0000

    Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7c3d6c1f0cacdc5a01a66ce5f99e09848f0d58f3
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 06:34:22 2009 +0000

    Fix month.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80769 91177308-0d34-0410-b5e6-96231b3b80d8

commit 47ecca719dca162477c10e787bb1ab0c4c571ece
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 06:31:02 2009 +0000

    fix PR4815: some cases where DeleteDeadInstruction can delete
    the instruction BBI points to.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80768 91177308-0d34-0410-b5e6-96231b3b80d8

commit 77f1627b24f4256e414864513212cc4648e89dcc
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 06:15:37 2009 +0000

    clean up this code a bit.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80767 91177308-0d34-0410-b5e6-96231b3b80d8

commit fa2d1ba102a74ecb0444957e0e5e1e99b064bfc3
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 06:11:42 2009 +0000

    eliminate VISIBILITY_HIDDEN from Transforms/Scalar.  PR4861

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80766 91177308-0d34-0410-b5e6-96231b3b80d8

commit 84a6720fa162828ccf52531135afc2449662a2cd
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 05:57:00 2009 +0000

    refactor select 'sched insertion' out to its own method.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80764 91177308-0d34-0410-b5e6-96231b3b80d8

commit 556464fc42a499f616530d6c9ec3ab698a05aa90
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 05:53:04 2009 +0000

    Add support for modeling whether or not the processor has support for
    conditional moves as a subtarget feature.  This is the easy part of
    PR4841.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80763 91177308-0d34-0410-b5e6-96231b3b80d8

commit 12aaa0197524bcbf878774e442335813667b8518
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 05:35:45 2009 +0000

    fix PR4848 an infinite loop when indexing down through a recursive gep
    and we get the original pointer type.  This doesn't mean that we're
    at the first pointer being indexed.  Correct the predicate.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80762 91177308-0d34-0410-b5e6-96231b3b80d8

commit 41c09930cfb4e36227f5f73bb618d2a7aa4da884
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 05:12:37 2009 +0000

    fix PR4837, some bugs folding vector compares.  These
    return a vector of i1, not i1 itself.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80761 91177308-0d34-0410-b5e6-96231b3b80d8

commit bc05eef1c31d86b525f0d80429a13344b13192a2
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 04:39:04 2009 +0000

    revert my patch, duncan points out what is wrong with my logic.  Add
    a comment so that I don't change this in the future :)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80760 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9d256f1e48cf074e739f478a48f9619797cbe4c1
Author: Chris Lattner <sabre@nondot.org>
Date:   Wed Sep 2 04:34:06 2009 +0000

    one more try at making this simpler, hopefully it won't break everything :)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80759 91177308-0d34-0410-b5e6-96231b3b80d8

commit d1585abba762e44ee70734e77dded04d3a6a77a7
Author: Duncan Sands <baldrick@free.fr>
Date:   Wed Sep 2 03:48:41 2009 +0000

    Complicate Chris's simplification, avoiding complaints
    about singular iterators when building with expensive
    checks turned on.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80757 91177308-0d34-0410-b5e6-96231b3b80d8

commit d7a9a27a450dce545da94ffc43df64c776eabaeb
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Wed Sep 2 02:43:11 2009 +0000

    Don't force the triple or data layout in this test. We just have to get them
    from the host and hope that works.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80751 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7b5cdc094c42b788e1c0d6708ba5fa077eca7f8a
Author: Dan Gohman <gohman@apple.com>
Date:   Wed Sep 2 01:14:16 2009 +0000

    Add a comment.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80749 91177308-0d34-0410-b5e6-96231b3b80d8

commit 251676e7beab341460c562976a1f3f4a2f873929
Author: Sean Callanan <scallanan@apple.com>
Date:   Wed Sep 2 00:55:49 2009 +0000

    Fixed the asmstrings for 8-bit, 16-bit, and 32-bit ADD %rAX, imm instructions.
    Added a 64-bit ADD %RAX, imm32 instruction.
    Added all 4 forms for AND %rAX, imm and CMP %rAX, imm.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80746 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5f0d0810c3224d8296a90ee7c504d19f6b99ea89
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Wed Sep 2 00:19:03 2009 +0000

    Fix PR4845: r77946 completely broke x86_64 Darwin (or any situation where the
    desired triplet is a sub-target, e.g. thumbv7 vs. arm host). Reverting the
    patch isn't quite right either since the previous behavior does not allow the
    triplet to be overridden with -march.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80742 91177308-0d34-0410-b5e6-96231b3b80d8

commit aae9da7d74762fa1aef3d9e9b3eba4657eb5bfd8
Author: Devang Patel <dpatel@apple.com>
Date:   Wed Sep 2 00:16:33 2009 +0000

    Disable uniqueness test for now.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80741 91177308-0d34-0410-b5e6-96231b3b80d8

commit bd93206d2cd5cfc5482b8b9d17a9d7e2862fe26b
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 1 23:56:42 2009 +0000

    For now disable MDNode uniquing. This fixes llvm-gcc bootstrap failure on certain Mac OS X 10.5. I am working on a proper fix.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80738 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2a073840a9863f7fde14aba104621ce546f35510
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 1 23:18:46 2009 +0000

    Avoid calling removeVirtualRegisterKilled which iterates over the operands
    to find the kill, since we already have the operand.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80736 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4868b2482d56166b836de78a4b35607a799f7958
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 1 22:51:08 2009 +0000

    Refactor some code into separate functions.  No functional changes.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80733 91177308-0d34-0410-b5e6-96231b3b80d8

commit 432d176192c6a1707a9f714ea00ea500f1d9a6ee
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 1 22:19:00 2009 +0000

    Move use of LV inside condition that guards for null LV.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80731 91177308-0d34-0410-b5e6-96231b3b80d8

commit 7cc00874d5de3b00205dcce03e05205916697d38
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 1 22:07:12 2009 +0000

    Fix build warning.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80730 91177308-0d34-0410-b5e6-96231b3b80d8

commit 064aca1f4cb7a3ac916d665db62056008ecde927
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 1 22:07:06 2009 +0000

    Simplify.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80729 91177308-0d34-0410-b5e6-96231b3b80d8

commit 914bc71e34cfa976d86bcd7c95fafd794dcc2020
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 1 22:07:00 2009 +0000

    Fix what I believe is a copy-n-pasto introduced in r78129.
     - Bruno, please check!!

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80728 91177308-0d34-0410-b5e6-96231b3b80d8

commit 8ac6c04c49a83ce12779ca42416fe5512e69a01e
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 1 22:06:53 2009 +0000

    X86/Encoding: Support ExternalSymbol operands in emitDisplacementField (for consistency).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80727 91177308-0d34-0410-b5e6-96231b3b80d8

commit 9f086b93c3bb001b72590024114ac8c19f5abdaa
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 1 22:06:46 2009 +0000

    Remove Offset from ExternalSybmol MachineOperands, this is unused (and at least partly unsupported, in X86 encoding at least).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80726 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3dfe01d21e412c113b13e222c0fde9970d258af2
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 21:37:50 2009 +0000

    debug intrinsics do not go in the callgraph, this fixes a couple
    clang regtest failures.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80724 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0934baa37a70c413600ebc3f2219822cbaf90830
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 20:33:43 2009 +0000

    Fix a regression I introduced in r80708, found by llvm-test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80718 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0c971ca2967e9dd20f26d8d68cacb131dd2fb7ca
Author: Bruno Cardoso Lopes <bruno.cardoso@gmail.com>
Date:   Tue Sep 1 19:25:52 2009 +0000

    Fix ELF Writter related memory leaks

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80717 91177308-0d34-0410-b5e6-96231b3b80d8

commit 231d73422a43624472e0ff74a1d9ec30740c7adb
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Tue Sep 1 19:08:51 2009 +0000

    OptimalEdgeProfiling: Reading in Profiles.
    This enables LLVM to read the OptimalEdgeProfiles.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80715 91177308-0d34-0410-b5e6-96231b3b80d8

commit 595887666dae3198db047b6e718129fdcf45ab8a
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Tue Sep 1 19:05:58 2009 +0000

    Addedum to r80712, forgot to add files.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80713 91177308-0d34-0410-b5e6-96231b3b80d8

commit 10dd7a2d9c1c123260c8afd730be1c109a20bb2c
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Tue Sep 1 19:03:44 2009 +0000

    OptimalEdgeProfiling: Creation of profiles.
    This adds the instrumentation and runtime part of OptimalEdgeProfiling.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80712 91177308-0d34-0410-b5e6-96231b3b80d8

commit 8093b5dc9a1e310a79fc7af83c1fc2e1867c2ef7
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Tue Sep 1 19:01:59 2009 +0000

    Small fix in ProfileEstimator that eliminates duplicated code.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80711 91177308-0d34-0410-b5e6-96231b3b80d8

commit d5496d944b0095cfd0d1cc93386a3c569b7f06d5
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 1 18:55:08 2009 +0000

    reduce size of SmallString to something more reasonable

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80710 91177308-0d34-0410-b5e6-96231b3b80d8

commit b980f057d2ea2119836fbf39040ca8e49386d297
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 18:52:39 2009 +0000

    remove CallGraphNode::replaceCallSite, it is redundant with other APIs.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80708 91177308-0d34-0410-b5e6-96231b3b80d8

commit c2d6585e5e77e5b44a9440f7cb821dada5009692
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 1 18:51:56 2009 +0000

    Add support for generating code for vst{234}lane intrinsics.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80707 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0b6ab543047eac94f4155297b7b12af78e0e6a6d
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 18:50:55 2009 +0000

    cleanup/simplify

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80706 91177308-0d34-0410-b5e6-96231b3b80d8

commit 10d150b7c19caf36e4dbe6505c0b43cf62c0a858
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 1 18:50:43 2009 +0000

    Fix incorrect declarations of intrinsics in this test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80705 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1e58780928c42ba7c34deb7bbb35c17391b3d36e
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 1 18:49:12 2009 +0000

    Use raw_ostream instead of sstream

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80704 91177308-0d34-0410-b5e6-96231b3b80d8

commit ecd40faa95e178986ff2fec6c7eaae10692be6f9
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 18:44:06 2009 +0000

    remove a bunch of explicit code previously needed to update the
    callgraph.  This is now dead because RAUW does the job.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80703 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4b023dd6936966cce0cfea28c5148168f7a5b40e
Author: David Goodwin <david_goodwin@apple.com>
Date:   Tue Sep 1 18:34:03 2009 +0000

    Add hidden flags to allow binary search of post-RA scheduling errors.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80702 91177308-0d34-0410-b5e6-96231b3b80d8

commit 02b0e35f988abea2d6e5a07a854b4c6192872355
Author: David Goodwin <david_goodwin@apple.com>
Date:   Tue Sep 1 18:32:09 2009 +0000

    RRX reads CPSR.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80699 91177308-0d34-0410-b5e6-96231b3b80d8

commit 1c79378308526587066ea216550858e780fd6423
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 18:32:03 2009 +0000

    doxygenate RefreshCallGraph, add a new 'verification mode', and run it after
    CGSCC passes make change to ensure they are updating the callgraph correctly
    (when assertions are enabled).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80698 91177308-0d34-0410-b5e6-96231b3b80d8

commit 96d7ddc073ae2bdbf5e0bda96a5d7d8f7185ecb4
Author: Dan Gohman <gohman@apple.com>
Date:   Tue Sep 1 18:29:01 2009 +0000

    Fix a typo in a comment.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80697 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3e4b1a34d5b499ec5547537b59505158e643305c
Author: Sean Callanan <scallanan@apple.com>
Date:   Tue Sep 1 18:14:18 2009 +0000

    Added TEST %rAX, $imm instructions to the Intel tables.  These are required for the X86 disassembler.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80696 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2507c18bfc58d649a6ddd20b3e3ce41b2ed0793f
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 18:13:40 2009 +0000

    simpler solution to iterator invalidation "problem" found
    by expensive checking.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80695 91177308-0d34-0410-b5e6-96231b3b80d8

commit d23a9667c9e7f88f4cdb2befc3adc08a5b7df776
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 17:56:32 2009 +0000

    enhance memcpy opt to turn memmoves into memcpy when the src/dest
    don't alias.  Remove an old and poorly reduced testcase that fails
    with this transform for reasons unrelated to the original test.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80693 91177308-0d34-0410-b5e6-96231b3b80d8

commit 8f43b86c52646711a6906e516e17b32224f1a104
Author: Bruno Cardoso Lopes <bruno.cardoso@gmail.com>
Date:   Tue Sep 1 17:27:58 2009 +0000

    Reapply 80278

    Add MO flags to simplify the printing of relocations.
    Remove the support for printing large code model relocs (which
    aren't supported anyway).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80691 91177308-0d34-0410-b5e6-96231b3b80d8

commit 598082b1dd506ca0d6540f2bcaded867bfbf77af
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 1 17:19:13 2009 +0000

    revert inadvertant change from previous commit

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80689 91177308-0d34-0410-b5e6-96231b3b80d8

commit 2e8a8c4cb8746fbe3d199d69b1efcabe557eec3f
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 17:09:55 2009 +0000

    random code cleanups, no functionality change.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80682 91177308-0d34-0410-b5e6-96231b3b80d8

commit 3efbb51978df6a37350f8d9d8c67ff3a988ad585
Author: Ted Kremenek <kremenek@apple.com>
Date:   Tue Sep 1 17:01:02 2009 +0000

    Update CMake files.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80680 91177308-0d34-0410-b5e6-96231b3b80d8

commit 90cc01b4e49618f75a3cb899cefaa0abe9ca7066
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 1 16:43:35 2009 +0000

    Simply LSDA lable emission to use a direct special-case output instead of
    EmitLabel()

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80677 91177308-0d34-0410-b5e6-96231b3b80d8

commit ce59c1a172148acb3140cd46dcb94a9d225f31d5
Author: Duncan Sands <baldrick@free.fr>
Date:   Tue Sep 1 15:13:02 2009 +0000

    Do not manipulate invalid iterators.  This fixes the
    llvm-gcc build when expensive checking is turned on.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80671 91177308-0d34-0410-b5e6-96231b3b80d8

commit 724c3211128a50b60e5e479d0e6b66de710a6470
Author: Sanjiv Gupta <sanjiv.gupta@microchip.com>
Date:   Tue Sep 1 10:47:31 2009 +0000

    Further refactoring of PIC16 Obj file code.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80670 91177308-0d34-0410-b5e6-96231b3b80d8

commit ba2ab19fb3bd60795d5e5c84d5ada7121ab5d282
Author: Benjamin Kramer <benny.kra@googlemail.com>
Date:   Tue Sep 1 10:24:10 2009 +0000

    Update CMakeLists.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80669 91177308-0d34-0410-b5e6-96231b3b80d8

commit 204b27e24b13676075ab11b149b3a67db3c59f03
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Tue Sep 1 10:08:39 2009 +0000

    Preparation for Optimal Edge Profiling:
    Add statistics for regular edge profiling, this enables the comparation of the
    number of edges inserted by regular and optimal edge profiling.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80668 91177308-0d34-0410-b5e6-96231b3b80d8

commit 09ae6e0d77d7eb3339a20c613a6f0a9c391dc9f3
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Tue Sep 1 10:06:05 2009 +0000

    Preparation for Optimal Edge Profiling:
    Optimal edge profiling is only possible when blocks with no predecessors get an
    virtual edge (BB,0) that counts the execution frequencies of this
    function-exiting blocks.
    This patch makes the necessary changes before actually enabling optimal edge profiling.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80667 91177308-0d34-0410-b5e6-96231b3b80d8

commit 76448f751688349d8dc7330dbe56ba0165878790
Author: Andreas Neustifter <astifter@gmx.at>
Date:   Tue Sep 1 08:48:42 2009 +0000

    Preparation for Optimal Edge Profiling:
    This adds a pass to verify the current profile against the flow conditions.
    This is very helpful when later on trying to perserve the profiling information
    during all passes.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80666 91177308-0d34-0410-b5e6-96231b3b80d8

commit aabe25ea1ff3a49b6daa2e643cdb92ac8cc285f5
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 06:33:49 2009 +0000

    testcase for PR3601

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80664 91177308-0d34-0410-b5e6-96231b3b80d8

commit a59b5decad2d3e3b9e2f565ff5d4e1857b9202a1
Author: Chris Lattner <sabre@nondot.org>
Date:   Tue Sep 1 06:31:31 2009 +0000

    Change CallGraphNode to maintain it's Function as an AssertingVH
    for sanity.  This didn't turn up any bugs.

    Change CallGraphNode to maintain its "callsite" information in the
    call edges list as a WeakVH instead of as an instruction*.  This fixes
    a broad class of dangling pointer bugs, and makes CallGraph have a number
    of useful invariants again.  This fixes the class of problem indicated
    by PR4029 and PR3601.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80663 91177308-0d34-0410-b5e6-96231b3b80d8

commit e18cb0735189d79b73d3643f9bfda482a82f498d
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 1 05:04:28 2009 +0000

    Add virtual destructor.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80660 91177308-0d34-0410-b5e6-96231b3b80d8

commit 56c573ec8f87ef5fe2d507b7fc1446efa1df0043
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 1 04:27:10 2009 +0000

    Add test for vld{234}_lane instructions.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80658 91177308-0d34-0410-b5e6-96231b3b80d8

commit d14b8b63b3557e85950beb061a1d8b01cff4eadf
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 1 04:26:28 2009 +0000

    Generate code for vld{234}_lane intrinsics.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80656 91177308-0d34-0410-b5e6-96231b3b80d8

commit 13099514dad37eb4e6f270fc84fb749c3eaeb487
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Tue Sep 1 04:18:40 2009 +0000

    Fix pr4843: When an instruction has multiple destination registers that are
    tied to different source registers, the TwoAddressInstructionPass needs to
    be smarter.  Change it to check before replacing a source register whether
    that source register is tied to a different destination register, and if so,
    defer handling it until a subsequent iteration.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80654 91177308-0d34-0410-b5e6-96231b3b80d8

commit ef0f63722ac72a66dd4486e6ac8a1719d12e6e13
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Tue Sep 1 04:09:03 2009 +0000

    llvm-mc: Store MCSymbolData value as a pointer (to make MSVC happy).

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80652 91177308-0d34-0410-b5e6-96231b3b80d8

commit 843c2a2675a78ce65e781d180fd284d4f4a2ff84
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 1 02:34:49 2009 +0000

    SJLJ is arm/darwin only for now. force the triple for the test

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80651 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4b673ee8fb5f7351de61d8bc06fb8958aa846d93
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 1 02:05:03 2009 +0000

    Fix compiler warnings

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80650 91177308-0d34-0410-b5e6-96231b3b80d8

commit 5e0257f9b7567c8c285ee3115c10d552c7c037fb
Author: Jim Grosbach <grosbach@apple.com>
Date:   Tue Sep 1 01:57:56 2009 +0000

    Clean up LSDA name generation and use for SJLJ exception handling. This
    makes an eggregious hack somewhat more palatable. Bringing the LSDA forward
    and making it a GV available for reference would be even better, but is
    beyond the scope of what I'm looking to solve at this point.

    Objective C++ code could generate function names that broke the previous
    scheme. This fixes that.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80649 91177308-0d34-0410-b5e6-96231b3b80d8

commit 8a6a4f5d031875716e06bf7339708874e97d915b
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 1 01:14:15 2009 +0000

    Introduce DILocation.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80648 91177308-0d34-0410-b5e6-96231b3b80d8

commit d4794f1da6e32d0eda205da2f994a25d1632aea9
Author: Devang Patel <dpatel@apple.com>
Date:   Tue Sep 1 00:53:21 2009 +0000

    Add getDirectory() and getFilename() interface to DIScope.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80647 91177308-0d34-0410-b5e6-96231b3b80d8

commit 318d70da84dd9c3371774284695e2f96613d68a9
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Aug 31 22:47:13 2009 +0000

    Subprogram is a scope. Derive DISubprogram from DIScope.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80637 91177308-0d34-0410-b5e6-96231b3b80d8

commit a53768e1e514ec9184b3e17c465b19f9334c1e5c
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Aug 31 22:00:15 2009 +0000

    Rename DIBlock as DILexicalBlock.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80633 91177308-0d34-0410-b5e6-96231b3b80d8

commit c8b451fceb3e26addeda713ec01dbaf1fa183711
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Aug 31 21:58:28 2009 +0000

    Don't use an iterator which is potentially invalidated.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80632 91177308-0d34-0410-b5e6-96231b3b80d8

commit acce6ef067e3e784306ea3e13c30913722a2207c
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Mon Aug 31 21:54:55 2009 +0000

    Use early exit and reduce indentation.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80631 91177308-0d34-0410-b5e6-96231b3b80d8

commit ce99fa7903584a25dd332004f3dcf639bbba91f6
Author: Bob Wilson <bob.wilson@apple.com>
Date:   Mon Aug 31 21:54:16 2009 +0000

    If the tied registers are already the same, there is no need to change
    them.  Move the code to make that change inside the conditional.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80630 91177308-0d34-0410-b5e6-96231b3b80d8

commit 0b3e9544a8c01d83bb746e80ef380e570db47be6
Author: Richard Osborne <richard@xmos.com>
Date:   Mon Aug 31 21:51:36 2009 +0000

    Add triple parsing support for XCore.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80629 91177308-0d34-0410-b5e6-96231b3b80d8

commit 4a47c2447110c5163806b46ee1be881adf70ce38
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Aug 31 21:34:44 2009 +0000

    Derive DICompileUnit from DIScope.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80627 91177308-0d34-0410-b5e6-96231b3b80d8

commit 248d5579576fdfb0f1dca59bc3c6cebb8a6976fc
Author: Caroline Tice <ctice@apple.com>
Date:   Mon Aug 31 21:19:37 2009 +0000

    Add flag to mark structs for Apple Block "byref" variables; also add code to
    modify the type and location debug information for these variables to match the
    programmer's expectations.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80625 91177308-0d34-0410-b5e6-96231b3b80d8

commit 30e24e0e6f8e94a50ef6f08911724ef5d43762d7
Author: Dan Gohman <gohman@apple.com>
Date:   Mon Aug 31 21:15:23 2009 +0000

    Extend the ValuesAtScope cache to cover all expressions, not just
    SCEVUnknowns, as the non-SCEVUnknown cases in the getSCEVAtScope code
    can also end up repeatedly climing through the same expression trees,
    which can be unusably slow when the trees are very tall.

    Also, add a quick check for SCEV pointer equality to the main
    SCEV comparison routine, as the full comparison code can be expensive
    in the case of large expression trees.

    These fix compile-time problems in some pathlogical cases.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80623 91177308-0d34-0410-b5e6-96231b3b80d8

commit 21dde52e1976411d2f85eb2505d98d6b8d23baa6
Author: Gabor Greif <ggreif@gmail.com>
Date:   Mon Aug 31 20:54:23 2009 +0000

    restore semantics of operator* (removing a FIXME I had to introduce in r80224)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80622 91177308-0d34-0410-b5e6-96231b3b80d8

commit 864c4b83472a97397039240f7d5e9c6e269174b1
Author: David Goodwin <david_goodwin@apple.com>
Date:   Mon Aug 31 20:47:02 2009 +0000

    Don't mark a register live at an undef use.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80621 91177308-0d34-0410-b5e6-96231b3b80d8

commit 94f536e037d399e79afa64c060da2ac0d4d6b4a7
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Aug 31 20:44:45 2009 +0000

    Introduce DIScope.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80620 91177308-0d34-0410-b5e6-96231b3b80d8

commit c9db7a5b14625f78cbd619582db31a985eeddd7d
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Aug 31 20:27:49 2009 +0000

    Oops. Fix inverted logic in assertion check.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80618 91177308-0d34-0410-b5e6-96231b3b80d8

commit 08ed20d6841e1879cff1c6b7717b64fd400dc913
Author: Evan Cheng <evan.cheng@apple.com>
Date:   Mon Aug 31 20:14:07 2009 +0000

    Remove .n suffix for some 16-bit opcodes now that Darwin assembler is fixed.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80615 91177308-0d34-0410-b5e6-96231b3b80d8

commit 34a26db1f0520916f9f5d8a0f31fc9c34119bb05
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Aug 31 19:14:05 2009 +0000

    X86/exp-asm-printer: Lower MachineOperand::MO_JumpTableIndex to MCOperand.
     - Down to 7 failures on 403.gcc.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80605 91177308-0d34-0410-b5e6-96231b3b80d8

commit 59c42d00cd177c318a10364ddea06290b1f9f320
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Aug 31 19:13:56 2009 +0000

    Stop printing old asm printing code inline with -experimental-asm-printer (this allows diffing and assembling the .s)

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80604 91177308-0d34-0410-b5e6-96231b3b80d8

commit befe952c385a9e2f26212b3cdea6439323964a46
Author: Daniel Dunbar <daniel@zuster.org>
Date:   Mon Aug 31 19:13:47 2009 +0000

    Avoid unnecessary +0 in experimental-asm-printer.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80603 91177308-0d34-0410-b5e6-96231b3b80d8

commit 56843af6f90e5bdf7d79a271d2406f57e6674122
Author: Devang Patel <dpatel@apple.com>
Date:   Mon Aug 31 18:49:10 2009 +0000

    Simplify isDerivedType() and other predicate interface.

    git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80602 91177308-0d34-0410-b5e6-96231b3b80d8
2009-10-02 11:09:40 +03:00

7132 lines
278 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>LLVM Assembly Language Reference Manual</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="author" content="Chris Lattner">
<meta name="description"
content="LLVM Assembly Language Reference Manual.">
<link rel="stylesheet" href="llvm.css" type="text/css">
</head>
<body>
<div class="doc_title"> LLVM Language Reference Manual </div>
<ol>
<li><a href="#abstract">Abstract</a></li>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#identifiers">Identifiers</a></li>
<li><a href="#highlevel">High Level Structure</a>
<ol>
<li><a href="#modulestructure">Module Structure</a></li>
<li><a href="#linkage">Linkage Types</a>
<ol>
<li><a href="#linkage_private">'<tt>private</tt>' Linkage</a></li>
<li><a href="#linkage_linker_private">'<tt>linker_private</tt>' Linkage</a></li>
<li><a href="#linkage_internal">'<tt>internal</tt>' Linkage</a></li>
<li><a href="#linkage_available_externally">'<tt>available_externally</tt>' Linkage</a></li>
<li><a href="#linkage_linkonce">'<tt>linkonce</tt>' Linkage</a></li>
<li><a href="#linkage_common">'<tt>common</tt>' Linkage</a></li>
<li><a href="#linkage_weak">'<tt>weak</tt>' Linkage</a></li>
<li><a href="#linkage_appending">'<tt>appending</tt>' Linkage</a></li>
<li><a href="#linkage_externweak">'<tt>extern_weak</tt>' Linkage</a></li>
<li><a href="#linkage_linkonce">'<tt>linkonce_odr</tt>' Linkage</a></li>
<li><a href="#linkage_weak">'<tt>weak_odr</tt>' Linkage</a></li>
<li><a href="#linkage_external">'<tt>externally visible</tt>' Linkage</a></li>
<li><a href="#linkage_dllimport">'<tt>dllimport</tt>' Linkage</a></li>
<li><a href="#linkage_dllexport">'<tt>dllexport</tt>' Linkage</a></li>
</ol>
</li>
<li><a href="#callingconv">Calling Conventions</a></li>
<li><a href="#namedtypes">Named Types</a></li>
<li><a href="#globalvars">Global Variables</a></li>
<li><a href="#functionstructure">Functions</a></li>
<li><a href="#aliasstructure">Aliases</a></li>
<li><a href="#paramattrs">Parameter Attributes</a></li>
<li><a href="#fnattrs">Function Attributes</a></li>
<li><a href="#gc">Garbage Collector Names</a></li>
<li><a href="#moduleasm">Module-Level Inline Assembly</a></li>
<li><a href="#datalayout">Data Layout</a></li>
<li><a href="#pointeraliasing">Pointer Aliasing Rules</a></li>
</ol>
</li>
<li><a href="#typesystem">Type System</a>
<ol>
<li><a href="#t_classifications">Type Classifications</a></li>
<li><a href="#t_primitive">Primitive Types</a>
<ol>
<li><a href="#t_integer">Integer Type</a></li>
<li><a href="#t_floating">Floating Point Types</a></li>
<li><a href="#t_void">Void Type</a></li>
<li><a href="#t_label">Label Type</a></li>
<li><a href="#t_metadata">Metadata Type</a></li>
</ol>
</li>
<li><a href="#t_derived">Derived Types</a>
<ol>
<li><a href="#t_array">Array Type</a></li>
<li><a href="#t_function">Function Type</a></li>
<li><a href="#t_pointer">Pointer Type</a></li>
<li><a href="#t_struct">Structure Type</a></li>
<li><a href="#t_pstruct">Packed Structure Type</a></li>
<li><a href="#t_vector">Vector Type</a></li>
<li><a href="#t_opaque">Opaque Type</a></li>
</ol>
</li>
<li><a href="#t_uprefs">Type Up-references</a></li>
</ol>
</li>
<li><a href="#constants">Constants</a>
<ol>
<li><a href="#simpleconstants">Simple Constants</a></li>
<li><a href="#complexconstants">Complex Constants</a></li>
<li><a href="#globalconstants">Global Variable and Function Addresses</a></li>
<li><a href="#undefvalues">Undefined Values</a></li>
<li><a href="#constantexprs">Constant Expressions</a></li>
<li><a href="#metadata">Embedded Metadata</a></li>
</ol>
</li>
<li><a href="#othervalues">Other Values</a>
<ol>
<li><a href="#inlineasm">Inline Assembler Expressions</a></li>
</ol>
</li>
<li><a href="#intrinsic_globals">Intrinsic Global Variables</a>
<ol>
<li><a href="#intg_used">The '<tt>llvm.used</tt>' Global Variable</a></li>
<li><a href="#intg_compiler_used">The '<tt>llvm.compiler.used</tt>'
Global Variable</a></li>
<li><a href="#intg_global_ctors">The '<tt>llvm.global_ctors</tt>'
Global Variable</a></li>
<li><a href="#intg_global_dtors">The '<tt>llvm.global_dtors</tt>'
Global Variable</a></li>
</ol>
</li>
<li><a href="#instref">Instruction Reference</a>
<ol>
<li><a href="#terminators">Terminator Instructions</a>
<ol>
<li><a href="#i_ret">'<tt>ret</tt>' Instruction</a></li>
<li><a href="#i_br">'<tt>br</tt>' Instruction</a></li>
<li><a href="#i_switch">'<tt>switch</tt>' Instruction</a></li>
<li><a href="#i_invoke">'<tt>invoke</tt>' Instruction</a></li>
<li><a href="#i_unwind">'<tt>unwind</tt>' Instruction</a></li>
<li><a href="#i_unreachable">'<tt>unreachable</tt>' Instruction</a></li>
</ol>
</li>
<li><a href="#binaryops">Binary Operations</a>
<ol>
<li><a href="#i_add">'<tt>add</tt>' Instruction</a></li>
<li><a href="#i_fadd">'<tt>fadd</tt>' Instruction</a></li>
<li><a href="#i_sub">'<tt>sub</tt>' Instruction</a></li>
<li><a href="#i_fsub">'<tt>fsub</tt>' Instruction</a></li>
<li><a href="#i_mul">'<tt>mul</tt>' Instruction</a></li>
<li><a href="#i_fmul">'<tt>fmul</tt>' Instruction</a></li>
<li><a href="#i_udiv">'<tt>udiv</tt>' Instruction</a></li>
<li><a href="#i_sdiv">'<tt>sdiv</tt>' Instruction</a></li>
<li><a href="#i_fdiv">'<tt>fdiv</tt>' Instruction</a></li>
<li><a href="#i_urem">'<tt>urem</tt>' Instruction</a></li>
<li><a href="#i_srem">'<tt>srem</tt>' Instruction</a></li>
<li><a href="#i_frem">'<tt>frem</tt>' Instruction</a></li>
</ol>
</li>
<li><a href="#bitwiseops">Bitwise Binary Operations</a>
<ol>
<li><a href="#i_shl">'<tt>shl</tt>' Instruction</a></li>
<li><a href="#i_lshr">'<tt>lshr</tt>' Instruction</a></li>
<li><a href="#i_ashr">'<tt>ashr</tt>' Instruction</a></li>
<li><a href="#i_and">'<tt>and</tt>' Instruction</a></li>
<li><a href="#i_or">'<tt>or</tt>' Instruction</a></li>
<li><a href="#i_xor">'<tt>xor</tt>' Instruction</a></li>
</ol>
</li>
<li><a href="#vectorops">Vector Operations</a>
<ol>
<li><a href="#i_extractelement">'<tt>extractelement</tt>' Instruction</a></li>
<li><a href="#i_insertelement">'<tt>insertelement</tt>' Instruction</a></li>
<li><a href="#i_shufflevector">'<tt>shufflevector</tt>' Instruction</a></li>
</ol>
</li>
<li><a href="#aggregateops">Aggregate Operations</a>
<ol>
<li><a href="#i_extractvalue">'<tt>extractvalue</tt>' Instruction</a></li>
<li><a href="#i_insertvalue">'<tt>insertvalue</tt>' Instruction</a></li>
</ol>
</li>
<li><a href="#memoryops">Memory Access and Addressing Operations</a>
<ol>
<li><a href="#i_malloc">'<tt>malloc</tt>' Instruction</a></li>
<li><a href="#i_free">'<tt>free</tt>' Instruction</a></li>
<li><a href="#i_alloca">'<tt>alloca</tt>' Instruction</a></li>
<li><a href="#i_load">'<tt>load</tt>' Instruction</a></li>
<li><a href="#i_store">'<tt>store</tt>' Instruction</a></li>
<li><a href="#i_getelementptr">'<tt>getelementptr</tt>' Instruction</a></li>
</ol>
</li>
<li><a href="#convertops">Conversion Operations</a>
<ol>
<li><a href="#i_trunc">'<tt>trunc .. to</tt>' Instruction</a></li>
<li><a href="#i_zext">'<tt>zext .. to</tt>' Instruction</a></li>
<li><a href="#i_sext">'<tt>sext .. to</tt>' Instruction</a></li>
<li><a href="#i_fptrunc">'<tt>fptrunc .. to</tt>' Instruction</a></li>
<li><a href="#i_fpext">'<tt>fpext .. to</tt>' Instruction</a></li>
<li><a href="#i_fptoui">'<tt>fptoui .. to</tt>' Instruction</a></li>
<li><a href="#i_fptosi">'<tt>fptosi .. to</tt>' Instruction</a></li>
<li><a href="#i_uitofp">'<tt>uitofp .. to</tt>' Instruction</a></li>
<li><a href="#i_sitofp">'<tt>sitofp .. to</tt>' Instruction</a></li>
<li><a href="#i_ptrtoint">'<tt>ptrtoint .. to</tt>' Instruction</a></li>
<li><a href="#i_inttoptr">'<tt>inttoptr .. to</tt>' Instruction</a></li>
<li><a href="#i_bitcast">'<tt>bitcast .. to</tt>' Instruction</a></li>
</ol>
</li>
<li><a href="#otherops">Other Operations</a>
<ol>
<li><a href="#i_icmp">'<tt>icmp</tt>' Instruction</a></li>
<li><a href="#i_fcmp">'<tt>fcmp</tt>' Instruction</a></li>
<li><a href="#i_phi">'<tt>phi</tt>' Instruction</a></li>
<li><a href="#i_select">'<tt>select</tt>' Instruction</a></li>
<li><a href="#i_call">'<tt>call</tt>' Instruction</a></li>
<li><a href="#i_va_arg">'<tt>va_arg</tt>' Instruction</a></li>
</ol>
</li>
</ol>
</li>
<li><a href="#intrinsics">Intrinsic Functions</a>
<ol>
<li><a href="#int_varargs">Variable Argument Handling Intrinsics</a>
<ol>
<li><a href="#int_va_start">'<tt>llvm.va_start</tt>' Intrinsic</a></li>
<li><a href="#int_va_end">'<tt>llvm.va_end</tt>' Intrinsic</a></li>
<li><a href="#int_va_copy">'<tt>llvm.va_copy</tt>' Intrinsic</a></li>
</ol>
</li>
<li><a href="#int_gc">Accurate Garbage Collection Intrinsics</a>
<ol>
<li><a href="#int_gcroot">'<tt>llvm.gcroot</tt>' Intrinsic</a></li>
<li><a href="#int_gcread">'<tt>llvm.gcread</tt>' Intrinsic</a></li>
<li><a href="#int_gcwrite">'<tt>llvm.gcwrite</tt>' Intrinsic</a></li>
</ol>
</li>
<li><a href="#int_codegen">Code Generator Intrinsics</a>
<ol>
<li><a href="#int_returnaddress">'<tt>llvm.returnaddress</tt>' Intrinsic</a></li>
<li><a href="#int_frameaddress">'<tt>llvm.frameaddress</tt>' Intrinsic</a></li>
<li><a href="#int_stacksave">'<tt>llvm.stacksave</tt>' Intrinsic</a></li>
<li><a href="#int_stackrestore">'<tt>llvm.stackrestore</tt>' Intrinsic</a></li>
<li><a href="#int_prefetch">'<tt>llvm.prefetch</tt>' Intrinsic</a></li>
<li><a href="#int_pcmarker">'<tt>llvm.pcmarker</tt>' Intrinsic</a></li>
<li><a href="#int_readcyclecounter"><tt>llvm.readcyclecounter</tt>' Intrinsic</a></li>
</ol>
</li>
<li><a href="#int_libc">Standard C Library Intrinsics</a>
<ol>
<li><a href="#int_memcpy">'<tt>llvm.memcpy.*</tt>' Intrinsic</a></li>
<li><a href="#int_memmove">'<tt>llvm.memmove.*</tt>' Intrinsic</a></li>
<li><a href="#int_memset">'<tt>llvm.memset.*</tt>' Intrinsic</a></li>
<li><a href="#int_sqrt">'<tt>llvm.sqrt.*</tt>' Intrinsic</a></li>
<li><a href="#int_powi">'<tt>llvm.powi.*</tt>' Intrinsic</a></li>
<li><a href="#int_sin">'<tt>llvm.sin.*</tt>' Intrinsic</a></li>
<li><a href="#int_cos">'<tt>llvm.cos.*</tt>' Intrinsic</a></li>
<li><a href="#int_pow">'<tt>llvm.pow.*</tt>' Intrinsic</a></li>
</ol>
</li>
<li><a href="#int_manip">Bit Manipulation Intrinsics</a>
<ol>
<li><a href="#int_bswap">'<tt>llvm.bswap.*</tt>' Intrinsics</a></li>
<li><a href="#int_ctpop">'<tt>llvm.ctpop.*</tt>' Intrinsic </a></li>
<li><a href="#int_ctlz">'<tt>llvm.ctlz.*</tt>' Intrinsic </a></li>
<li><a href="#int_cttz">'<tt>llvm.cttz.*</tt>' Intrinsic </a></li>
</ol>
</li>
<li><a href="#int_overflow">Arithmetic with Overflow Intrinsics</a>
<ol>
<li><a href="#int_sadd_overflow">'<tt>llvm.sadd.with.overflow.*</tt> Intrinsics</a></li>
<li><a href="#int_uadd_overflow">'<tt>llvm.uadd.with.overflow.*</tt> Intrinsics</a></li>
<li><a href="#int_ssub_overflow">'<tt>llvm.ssub.with.overflow.*</tt> Intrinsics</a></li>
<li><a href="#int_usub_overflow">'<tt>llvm.usub.with.overflow.*</tt> Intrinsics</a></li>
<li><a href="#int_smul_overflow">'<tt>llvm.smul.with.overflow.*</tt> Intrinsics</a></li>
<li><a href="#int_umul_overflow">'<tt>llvm.umul.with.overflow.*</tt> Intrinsics</a></li>
</ol>
</li>
<li><a href="#int_debugger">Debugger intrinsics</a></li>
<li><a href="#int_eh">Exception Handling intrinsics</a></li>
<li><a href="#int_trampoline">Trampoline Intrinsic</a>
<ol>
<li><a href="#int_it">'<tt>llvm.init.trampoline</tt>' Intrinsic</a></li>
</ol>
</li>
<li><a href="#int_atomics">Atomic intrinsics</a>
<ol>
<li><a href="#int_memory_barrier"><tt>llvm.memory_barrier</tt></a></li>
<li><a href="#int_atomic_cmp_swap"><tt>llvm.atomic.cmp.swap</tt></a></li>
<li><a href="#int_atomic_swap"><tt>llvm.atomic.swap</tt></a></li>
<li><a href="#int_atomic_load_add"><tt>llvm.atomic.load.add</tt></a></li>
<li><a href="#int_atomic_load_sub"><tt>llvm.atomic.load.sub</tt></a></li>
<li><a href="#int_atomic_load_and"><tt>llvm.atomic.load.and</tt></a></li>
<li><a href="#int_atomic_load_nand"><tt>llvm.atomic.load.nand</tt></a></li>
<li><a href="#int_atomic_load_or"><tt>llvm.atomic.load.or</tt></a></li>
<li><a href="#int_atomic_load_xor"><tt>llvm.atomic.load.xor</tt></a></li>
<li><a href="#int_atomic_load_max"><tt>llvm.atomic.load.max</tt></a></li>
<li><a href="#int_atomic_load_min"><tt>llvm.atomic.load.min</tt></a></li>
<li><a href="#int_atomic_load_umax"><tt>llvm.atomic.load.umax</tt></a></li>
<li><a href="#int_atomic_load_umin"><tt>llvm.atomic.load.umin</tt></a></li>
</ol>
</li>
<li><a href="#int_general">General intrinsics</a>
<ol>
<li><a href="#int_var_annotation">
'<tt>llvm.var.annotation</tt>' Intrinsic</a></li>
<li><a href="#int_annotation">
'<tt>llvm.annotation.*</tt>' Intrinsic</a></li>
<li><a href="#int_trap">
'<tt>llvm.trap</tt>' Intrinsic</a></li>
<li><a href="#int_stackprotector">
'<tt>llvm.stackprotector</tt>' Intrinsic</a></li>
</ol>
</li>
</ol>
</li>
</ol>
<div class="doc_author">
<p>Written by <a href="mailto:sabre@nondot.org">Chris Lattner</a>
and <a href="mailto:vadve@cs.uiuc.edu">Vikram Adve</a></p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="abstract">Abstract </a></div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>This document is a reference manual for the LLVM assembly language. LLVM is
a Static Single Assignment (SSA) based representation that provides type
safety, low-level operations, flexibility, and the capability of representing
'all' high-level languages cleanly. It is the common code representation
used throughout all phases of the LLVM compilation strategy.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="introduction">Introduction</a> </div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>The LLVM code representation is designed to be used in three different forms:
as an in-memory compiler IR, as an on-disk bitcode representation (suitable
for fast loading by a Just-In-Time compiler), and as a human readable
assembly language representation. This allows LLVM to provide a powerful
intermediate representation for efficient compiler transformations and
analysis, while providing a natural means to debug and visualize the
transformations. The three different forms of LLVM are all equivalent. This
document describes the human readable representation and notation.</p>
<p>The LLVM representation aims to be light-weight and low-level while being
expressive, typed, and extensible at the same time. It aims to be a
"universal IR" of sorts, by being at a low enough level that high-level ideas
may be cleanly mapped to it (similar to how microprocessors are "universal
IR's", allowing many source languages to be mapped to them). By providing
type information, LLVM can be used as the target of optimizations: for
example, through pointer analysis, it can be proven that a C automatic
variable is never accessed outside of the current function... allowing it to
be promoted to a simple SSA value instead of a memory location.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="wellformed">Well-Formedness</a> </div>
<div class="doc_text">
<p>It is important to note that this document describes 'well formed' LLVM
assembly language. There is a difference between what the parser accepts and
what is considered 'well formed'. For example, the following instruction is
syntactically okay, but not well formed:</p>
<div class="doc_code">
<pre>
%x = <a href="#i_add">add</a> i32 1, %x
</pre>
</div>
<p>...because the definition of <tt>%x</tt> does not dominate all of its
uses. The LLVM infrastructure provides a verification pass that may be used
to verify that an LLVM module is well formed. This pass is automatically run
by the parser after parsing input assembly and by the optimizer before it
outputs bitcode. The violations pointed out by the verifier pass indicate
bugs in transformation passes or input to the parser.</p>
</div>
<!-- Describe the typesetting conventions here. -->
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="identifiers">Identifiers</a> </div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>LLVM identifiers come in two basic types: global and local. Global
identifiers (functions, global variables) begin with the <tt>'@'</tt>
character. Local identifiers (register names, types) begin with
the <tt>'%'</tt> character. Additionally, there are three different formats
for identifiers, for different purposes:</p>
<ol>
<li>Named values are represented as a string of characters with their prefix.
For example, <tt>%foo</tt>, <tt>@DivisionByZero</tt>,
<tt>%a.really.long.identifier</tt>. The actual regular expression used is
'<tt>[%@][a-zA-Z$._][a-zA-Z$._0-9]*</tt>'. Identifiers which require
other characters in their names can be surrounded with quotes. Special
characters may be escaped using <tt>"\xx"</tt> where <tt>xx</tt> is the
ASCII code for the character in hexadecimal. In this way, any character
can be used in a name value, even quotes themselves.</li>
<li>Unnamed values are represented as an unsigned numeric value with their
prefix. For example, <tt>%12</tt>, <tt>@2</tt>, <tt>%44</tt>.</li>
<li>Constants, which are described in a <a href="#constants">section about
constants</a>, below.</li>
</ol>
<p>LLVM requires that values start with a prefix for two reasons: Compilers
don't need to worry about name clashes with reserved words, and the set of
reserved words may be expanded in the future without penalty. Additionally,
unnamed identifiers allow a compiler to quickly come up with a temporary
variable without having to avoid symbol table conflicts.</p>
<p>Reserved words in LLVM are very similar to reserved words in other
languages. There are keywords for different opcodes
('<tt><a href="#i_add">add</a></tt>',
'<tt><a href="#i_bitcast">bitcast</a></tt>',
'<tt><a href="#i_ret">ret</a></tt>', etc...), for primitive type names
('<tt><a href="#t_void">void</a></tt>',
'<tt><a href="#t_primitive">i32</a></tt>', etc...), and others. These
reserved words cannot conflict with variable names, because none of them
start with a prefix character (<tt>'%'</tt> or <tt>'@'</tt>).</p>
<p>Here is an example of LLVM code to multiply the integer variable
'<tt>%X</tt>' by 8:</p>
<p>The easy way:</p>
<div class="doc_code">
<pre>
%result = <a href="#i_mul">mul</a> i32 %X, 8
</pre>
</div>
<p>After strength reduction:</p>
<div class="doc_code">
<pre>
%result = <a href="#i_shl">shl</a> i32 %X, i8 3
</pre>
</div>
<p>And the hard way:</p>
<div class="doc_code">
<pre>
<a href="#i_add">add</a> i32 %X, %X <i>; yields {i32}:%0</i>
<a href="#i_add">add</a> i32 %0, %0 <i>; yields {i32}:%1</i>
%result = <a href="#i_add">add</a> i32 %1, %1
</pre>
</div>
<p>This last way of multiplying <tt>%X</tt> by 8 illustrates several important
lexical features of LLVM:</p>
<ol>
<li>Comments are delimited with a '<tt>;</tt>' and go until the end of
line.</li>
<li>Unnamed temporaries are created when the result of a computation is not
assigned to a named value.</li>
<li>Unnamed temporaries are numbered sequentially</li>
</ol>
<p>...and it also shows a convention that we follow in this document. When
demonstrating instructions, we will follow an instruction with a comment that
defines the type and name of value produced. Comments are shown in italic
text.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="highlevel">High Level Structure</a> </div>
<!-- *********************************************************************** -->
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="modulestructure">Module Structure</a>
</div>
<div class="doc_text">
<p>LLVM programs are composed of "Module"s, each of which is a translation unit
of the input programs. Each module consists of functions, global variables,
and symbol table entries. Modules may be combined together with the LLVM
linker, which merges function (and global variable) definitions, resolves
forward declarations, and merges symbol table entries. Here is an example of
the "hello world" module:</p>
<div class="doc_code">
<pre><i>; Declare the string constant as a global constant...</i>
<a href="#identifiers">@.LC0</a> = <a href="#linkage_internal">internal</a> <a
href="#globalvars">constant</a> <a href="#t_array">[13 x i8]</a> c"hello world\0A\00" <i>; [13 x i8]*</i>
<i>; External declaration of the puts function</i>
<a href="#functionstructure">declare</a> i32 @puts(i8 *) <i>; i32(i8 *)* </i>
<i>; Definition of main function</i>
define i32 @main() { <i>; i32()* </i>
<i>; Convert [13 x i8]* to i8 *...</i>
%cast210 = <a
href="#i_getelementptr">getelementptr</a> [13 x i8]* @.LC0, i64 0, i64 0 <i>; i8 *</i>
<i>; Call puts function to write out the string to stdout...</i>
<a
href="#i_call">call</a> i32 @puts(i8 * %cast210) <i>; i32</i>
<a
href="#i_ret">ret</a> i32 0<br>}<br>
</pre>
</div>
<p>This example is made up of a <a href="#globalvars">global variable</a> named
"<tt>.LC0</tt>", an external declaration of the "<tt>puts</tt>" function, and
a <a href="#functionstructure">function definition</a> for
"<tt>main</tt>".</p>
<p>In general, a module is made up of a list of global values, where both
functions and global variables are global values. Global values are
represented by a pointer to a memory location (in this case, a pointer to an
array of char, and a pointer to a function), and have one of the
following <a href="#linkage">linkage types</a>.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="linkage">Linkage Types</a>
</div>
<div class="doc_text">
<p>All Global Variables and Functions have one of the following types of
linkage:</p>
<dl>
<dt><tt><b><a name="linkage_private">private</a></b></tt>: </dt>
<dd>Global values with private linkage are only directly accessible by objects
in the current module. In particular, linking code into a module with an
private global value may cause the private to be renamed as necessary to
avoid collisions. Because the symbol is private to the module, all
references can be updated. This doesn't show up in any symbol table in the
object file.</dd>
<dt><tt><b><a name="linkage_linker_private">linker_private</a></b></tt>: </dt>
<dd>Similar to private, but the symbol is passed through the assembler and
removed by the linker after evaluation. Note that (unlike private
symbols) linker_private symbols are subject to coalescing by the linker:
weak symbols get merged and redefinitions are rejected. However, unlike
normal strong symbols, they are removed by the linker from the final
linked image (executable or dynamic library).</dd>
<dt><tt><b><a name="linkage_internal">internal</a></b></tt>: </dt>
<dd>Similar to private, but the value shows as a local symbol
(<tt>STB_LOCAL</tt> in the case of ELF) in the object file. This
corresponds to the notion of the '<tt>static</tt>' keyword in C.</dd>
<dt><tt><b><a name="linkage_available_externally">available_externally</a></b></tt>: </dt>
<dd>Globals with "<tt>available_externally</tt>" linkage are never emitted
into the object file corresponding to the LLVM module. They exist to
allow inlining and other optimizations to take place given knowledge of
the definition of the global, which is known to be somewhere outside the
module. Globals with <tt>available_externally</tt> linkage are allowed to
be discarded at will, and are otherwise the same as <tt>linkonce_odr</tt>.
This linkage type is only allowed on definitions, not declarations.</dd>
<dt><tt><b><a name="linkage_linkonce">linkonce</a></b></tt>: </dt>
<dd>Globals with "<tt>linkonce</tt>" linkage are merged with other globals of
the same name when linkage occurs. This is typically used to implement
inline functions, templates, or other code which must be generated in each
translation unit that uses it. Unreferenced <tt>linkonce</tt> globals are
allowed to be discarded.</dd>
<dt><tt><b><a name="linkage_weak">weak</a></b></tt>: </dt>
<dd>"<tt>weak</tt>" linkage has the same merging semantics as
<tt>linkonce</tt> linkage, except that unreferenced globals with
<tt>weak</tt> linkage may not be discarded. This is used for globals that
are declared "weak" in C source code.</dd>
<dt><tt><b><a name="linkage_common">common</a></b></tt>: </dt>
<dd>"<tt>common</tt>" linkage is most similar to "<tt>weak</tt>" linkage, but
they are used for tentative definitions in C, such as "<tt>int X;</tt>" at
global scope.
Symbols with "<tt>common</tt>" linkage are merged in the same way as
<tt>weak symbols</tt>, and they may not be deleted if unreferenced.
<tt>common</tt> symbols may not have an explicit section,
must have a zero initializer, and may not be marked '<a
href="#globalvars"><tt>constant</tt></a>'. Functions and aliases may not
have common linkage.</dd>
<dt><tt><b><a name="linkage_appending">appending</a></b></tt>: </dt>
<dd>"<tt>appending</tt>" linkage may only be applied to global variables of
pointer to array type. When two global variables with appending linkage
are linked together, the two global arrays are appended together. This is
the LLVM, typesafe, equivalent of having the system linker append together
"sections" with identical names when .o files are linked.</dd>
<dt><tt><b><a name="linkage_externweak">extern_weak</a></b></tt>: </dt>
<dd>The semantics of this linkage follow the ELF object file model: the symbol
is weak until linked, if not linked, the symbol becomes null instead of
being an undefined reference.</dd>
<dt><tt><b><a name="linkage_linkonce">linkonce_odr</a></b></tt>: </dt>
<dt><tt><b><a name="linkage_weak">weak_odr</a></b></tt>: </dt>
<dd>Some languages allow differing globals to be merged, such as two functions
with different semantics. Other languages, such as <tt>C++</tt>, ensure
that only equivalent globals are ever merged (the "one definition rule" -
"ODR"). Such languages can use the <tt>linkonce_odr</tt>
and <tt>weak_odr</tt> linkage types to indicate that the global will only
be merged with equivalent globals. These linkage types are otherwise the
same as their non-<tt>odr</tt> versions.</dd>
<dt><tt><b><a name="linkage_external">externally visible</a></b></tt>:</dt>
<dd>If none of the above identifiers are used, the global is externally
visible, meaning that it participates in linkage and can be used to
resolve external symbol references.</dd>
</dl>
<p>The next two types of linkage are targeted for Microsoft Windows platform
only. They are designed to support importing (exporting) symbols from (to)
DLLs (Dynamic Link Libraries).</p>
<dl>
<dt><tt><b><a name="linkage_dllimport">dllimport</a></b></tt>: </dt>
<dd>"<tt>dllimport</tt>" linkage causes the compiler to reference a function
or variable via a global pointer to a pointer that is set up by the DLL
exporting the symbol. On Microsoft Windows targets, the pointer name is
formed by combining <code>__imp_</code> and the function or variable
name.</dd>
<dt><tt><b><a name="linkage_dllexport">dllexport</a></b></tt>: </dt>
<dd>"<tt>dllexport</tt>" linkage causes the compiler to provide a global
pointer to a pointer in a DLL, so that it can be referenced with the
<tt>dllimport</tt> attribute. On Microsoft Windows targets, the pointer
name is formed by combining <code>__imp_</code> and the function or
variable name.</dd>
</dl>
<p>For example, since the "<tt>.LC0</tt>" variable is defined to be internal, if
another module defined a "<tt>.LC0</tt>" variable and was linked with this
one, one of the two would be renamed, preventing a collision. Since
"<tt>main</tt>" and "<tt>puts</tt>" are external (i.e., lacking any linkage
declarations), they are accessible outside of the current module.</p>
<p>It is illegal for a function <i>declaration</i> to have any linkage type
other than "externally visible", <tt>dllimport</tt>
or <tt>extern_weak</tt>.</p>
<p>Aliases can have only <tt>external</tt>, <tt>internal</tt>, <tt>weak</tt>
or <tt>weak_odr</tt> linkages.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="callingconv">Calling Conventions</a>
</div>
<div class="doc_text">
<p>LLVM <a href="#functionstructure">functions</a>, <a href="#i_call">calls</a>
and <a href="#i_invoke">invokes</a> can all have an optional calling
convention specified for the call. The calling convention of any pair of
dynamic caller/callee must match, or the behavior of the program is
undefined. The following calling conventions are supported by LLVM, and more
may be added in the future:</p>
<dl>
<dt><b>"<tt>ccc</tt>" - The C calling convention</b>:</dt>
<dd>This calling convention (the default if no other calling convention is
specified) matches the target C calling conventions. This calling
convention supports varargs function calls and tolerates some mismatch in
the declared prototype and implemented declaration of the function (as
does normal C).</dd>
<dt><b>"<tt>fastcc</tt>" - The fast calling convention</b>:</dt>
<dd>This calling convention attempts to make calls as fast as possible
(e.g. by passing things in registers). This calling convention allows the
target to use whatever tricks it wants to produce fast code for the
target, without having to conform to an externally specified ABI
(Application Binary Interface). Implementations of this convention should
allow arbitrary <a href="CodeGenerator.html#tailcallopt">tail call
optimization</a> to be supported. This calling convention does not
support varargs and requires the prototype of all callees to exactly match
the prototype of the function definition.</dd>
<dt><b>"<tt>coldcc</tt>" - The cold calling convention</b>:</dt>
<dd>This calling convention attempts to make code in the caller as efficient
as possible under the assumption that the call is not commonly executed.
As such, these calls often preserve all registers so that the call does
not break any live ranges in the caller side. This calling convention
does not support varargs and requires the prototype of all callees to
exactly match the prototype of the function definition.</dd>
<dt><b>"<tt>cc &lt;<em>n</em>&gt;</tt>" - Numbered convention</b>:</dt>
<dd>Any calling convention may be specified by number, allowing
target-specific calling conventions to be used. Target specific calling
conventions start at 64.</dd>
</dl>
<p>More calling conventions can be added/defined on an as-needed basis, to
support Pascal conventions or any other well-known target-independent
convention.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="visibility">Visibility Styles</a>
</div>
<div class="doc_text">
<p>All Global Variables and Functions have one of the following visibility
styles:</p>
<dl>
<dt><b>"<tt>default</tt>" - Default style</b>:</dt>
<dd>On targets that use the ELF object file format, default visibility means
that the declaration is visible to other modules and, in shared libraries,
means that the declared entity may be overridden. On Darwin, default
visibility means that the declaration is visible to other modules. Default
visibility corresponds to "external linkage" in the language.</dd>
<dt><b>"<tt>hidden</tt>" - Hidden style</b>:</dt>
<dd>Two declarations of an object with hidden visibility refer to the same
object if they are in the same shared object. Usually, hidden visibility
indicates that the symbol will not be placed into the dynamic symbol
table, so no other module (executable or shared library) can reference it
directly.</dd>
<dt><b>"<tt>protected</tt>" - Protected style</b>:</dt>
<dd>On ELF, protected visibility indicates that the symbol will be placed in
the dynamic symbol table, but that references within the defining module
will bind to the local symbol. That is, the symbol cannot be overridden by
another module.</dd>
</dl>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="namedtypes">Named Types</a>
</div>
<div class="doc_text">
<p>LLVM IR allows you to specify name aliases for certain types. This can make
it easier to read the IR and make the IR more condensed (particularly when
recursive types are involved). An example of a name specification is:</p>
<div class="doc_code">
<pre>
%mytype = type { %mytype*, i32 }
</pre>
</div>
<p>You may give a name to any <a href="#typesystem">type</a> except
"<a href="t_void">void</a>". Type name aliases may be used anywhere a type
is expected with the syntax "%mytype".</p>
<p>Note that type names are aliases for the structural type that they indicate,
and that you can therefore specify multiple names for the same type. This
often leads to confusing behavior when dumping out a .ll file. Since LLVM IR
uses structural typing, the name is not part of the type. When printing out
LLVM IR, the printer will pick <em>one name</em> to render all types of a
particular shape. This means that if you have code where two different
source types end up having the same LLVM type, that the dumper will sometimes
print the "wrong" or unexpected type. This is an important design point and
isn't going to change.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="globalvars">Global Variables</a>
</div>
<div class="doc_text">
<p>Global variables define regions of memory allocated at compilation time
instead of run-time. Global variables may optionally be initialized, may
have an explicit section to be placed in, and may have an optional explicit
alignment specified. A variable may be defined as "thread_local", which
means that it will not be shared by threads (each thread will have a
separated copy of the variable). A variable may be defined as a global
"constant," which indicates that the contents of the variable
will <b>never</b> be modified (enabling better optimization, allowing the
global data to be placed in the read-only section of an executable, etc).
Note that variables that need runtime initialization cannot be marked
"constant" as there is a store to the variable.</p>
<p>LLVM explicitly allows <em>declarations</em> of global variables to be marked
constant, even if the final definition of the global is not. This capability
can be used to enable slightly better optimization of the program, but
requires the language definition to guarantee that optimizations based on the
'constantness' are valid for the translation units that do not include the
definition.</p>
<p>As SSA values, global variables define pointer values that are in scope
(i.e. they dominate) all basic blocks in the program. Global variables
always define a pointer to their "content" type because they describe a
region of memory, and all memory objects in LLVM are accessed through
pointers.</p>
<p>A global variable may be declared to reside in a target-specific numbered
address space. For targets that support them, address spaces may affect how
optimizations are performed and/or what target instructions are used to
access the variable. The default address space is zero. The address space
qualifier must precede any other attributes.</p>
<p>LLVM allows an explicit section to be specified for globals. If the target
supports it, it will emit globals to the section specified.</p>
<p>An explicit alignment may be specified for a global. If not present, or if
the alignment is set to zero, the alignment of the global is set by the
target to whatever it feels convenient. If an explicit alignment is
specified, the global is forced to have at least that much alignment. All
alignments must be a power of 2.</p>
<p>For example, the following defines a global in a numbered address space with
an initializer, section, and alignment:</p>
<div class="doc_code">
<pre>
@G = addrspace(5) constant float 1.0, section "foo", align 4
</pre>
</div>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="functionstructure">Functions</a>
</div>
<div class="doc_text">
<p>LLVM function definitions consist of the "<tt>define</tt>" keyord, an
optional <a href="#linkage">linkage type</a>, an optional
<a href="#visibility">visibility style</a>, an optional
<a href="#callingconv">calling convention</a>, a return type, an optional
<a href="#paramattrs">parameter attribute</a> for the return type, a function
name, a (possibly empty) argument list (each with optional
<a href="#paramattrs">parameter attributes</a>), optional
<a href="#fnattrs">function attributes</a>, an optional section, an optional
alignment, an optional <a href="#gc">garbage collector name</a>, an opening
curly brace, a list of basic blocks, and a closing curly brace.</p>
<p>LLVM function declarations consist of the "<tt>declare</tt>" keyword, an
optional <a href="#linkage">linkage type</a>, an optional
<a href="#visibility">visibility style</a>, an optional
<a href="#callingconv">calling convention</a>, a return type, an optional
<a href="#paramattrs">parameter attribute</a> for the return type, a function
name, a possibly empty list of arguments, an optional alignment, and an
optional <a href="#gc">garbage collector name</a>.</p>
<p>A function definition contains a list of basic blocks, forming the CFG
(Control Flow Graph) for the function. Each basic block may optionally start
with a label (giving the basic block a symbol table entry), contains a list
of instructions, and ends with a <a href="#terminators">terminator</a>
instruction (such as a branch or function return).</p>
<p>The first basic block in a function is special in two ways: it is immediately
executed on entrance to the function, and it is not allowed to have
predecessor basic blocks (i.e. there can not be any branches to the entry
block of a function). Because the block can have no predecessors, it also
cannot have any <a href="#i_phi">PHI nodes</a>.</p>
<p>LLVM allows an explicit section to be specified for functions. If the target
supports it, it will emit functions to the section specified.</p>
<p>An explicit alignment may be specified for a function. If not present, or if
the alignment is set to zero, the alignment of the function is set by the
target to whatever it feels convenient. If an explicit alignment is
specified, the function is forced to have at least that much alignment. All
alignments must be a power of 2.</p>
<h5>Syntax:</h5>
<div class="doc_code">
<pre>
define [<a href="#linkage">linkage</a>] [<a href="#visibility">visibility</a>]
[<a href="#callingconv">cconv</a>] [<a href="#paramattrs">ret attrs</a>]
&lt;ResultType&gt; @&lt;FunctionName&gt; ([argument list])
[<a href="#fnattrs">fn Attrs</a>] [section "name"] [align N]
[<a href="#gc">gc</a>] { ... }
</pre>
</div>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="aliasstructure">Aliases</a>
</div>
<div class="doc_text">
<p>Aliases act as "second name" for the aliasee value (which can be either
function, global variable, another alias or bitcast of global value). Aliases
may have an optional <a href="#linkage">linkage type</a>, and an
optional <a href="#visibility">visibility style</a>.</p>
<h5>Syntax:</h5>
<div class="doc_code">
<pre>
@&lt;Name&gt; = alias [Linkage] [Visibility] &lt;AliaseeTy&gt; @&lt;Aliasee&gt;
</pre>
</div>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="paramattrs">Parameter Attributes</a></div>
<div class="doc_text">
<p>The return type and each parameter of a function type may have a set of
<i>parameter attributes</i> associated with them. Parameter attributes are
used to communicate additional information about the result or parameters of
a function. Parameter attributes are considered to be part of the function,
not of the function type, so functions with different parameter attributes
can have the same function type.</p>
<p>Parameter attributes are simple keywords that follow the type specified. If
multiple parameter attributes are needed, they are space separated. For
example:</p>
<div class="doc_code">
<pre>
declare i32 @printf(i8* noalias nocapture, ...)
declare i32 @atoi(i8 zeroext)
declare signext i8 @returns_signed_char()
</pre>
</div>
<p>Note that any attributes for the function result (<tt>nounwind</tt>,
<tt>readonly</tt>) come immediately after the argument list.</p>
<p>Currently, only the following parameter attributes are defined:</p>
<dl>
<dt><tt>zeroext</tt></dt>
<dd>This indicates to the code generator that the parameter or return value
should be zero-extended to a 32-bit value by the caller (for a parameter)
or the callee (for a return value).</dd>
<dt><tt>signext</tt></dt>
<dd>This indicates to the code generator that the parameter or return value
should be sign-extended to a 32-bit value by the caller (for a parameter)
or the callee (for a return value).</dd>
<dt><tt>inreg</tt></dt>
<dd>This indicates that this parameter or return value should be treated in a
special target-dependent fashion during while emitting code for a function
call or return (usually, by putting it in a register as opposed to memory,
though some targets use it to distinguish between two different kinds of
registers). Use of this attribute is target-specific.</dd>
<dt><tt><a name="byval">byval</a></tt></dt>
<dd>This indicates that the pointer parameter should really be passed by value
to the function. The attribute implies that a hidden copy of the pointee
is made between the caller and the callee, so the callee is unable to
modify the value in the callee. This attribute is only valid on LLVM
pointer arguments. It is generally used to pass structs and arrays by
value, but is also valid on pointers to scalars. The copy is considered
to belong to the caller not the callee (for example,
<tt><a href="#readonly">readonly</a></tt> functions should not write to
<tt>byval</tt> parameters). This is not a valid attribute for return
values. The byval attribute also supports specifying an alignment with
the align attribute. This has a target-specific effect on the code
generator that usually indicates a desired alignment for the synthesized
stack slot.</dd>
<dt><tt>sret</tt></dt>
<dd>This indicates that the pointer parameter specifies the address of a
structure that is the return value of the function in the source program.
This pointer must be guaranteed by the caller to be valid: loads and
stores to the structure may be assumed by the callee to not to trap. This
may only be applied to the first parameter. This is not a valid attribute
for return values. </dd>
<dt><tt>noalias</tt></dt>
<dd>This indicates that the pointer does not alias any global or any other
parameter. The caller is responsible for ensuring that this is the
case. On a function return value, <tt>noalias</tt> additionally indicates
that the pointer does not alias any other pointers visible to the
caller. For further details, please see the discussion of the NoAlias
response in
<a href="http://llvm.org/docs/AliasAnalysis.html#MustMayNo">alias
analysis</a>.</dd>
<dt><tt>nocapture</tt></dt>
<dd>This indicates that the callee does not make any copies of the pointer
that outlive the callee itself. This is not a valid attribute for return
values.</dd>
<dt><tt>nest</tt></dt>
<dd>This indicates that the pointer parameter can be excised using the
<a href="#int_trampoline">trampoline intrinsics</a>. This is not a valid
attribute for return values.</dd>
</dl>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="gc">Garbage Collector Names</a>
</div>
<div class="doc_text">
<p>Each function may specify a garbage collector name, which is simply a
string:</p>
<div class="doc_code">
<pre>
define void @f() gc "name" { ...
</pre>
</div>
<p>The compiler declares the supported values of <i>name</i>. Specifying a
collector which will cause the compiler to alter its output in order to
support the named garbage collection algorithm.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="fnattrs">Function Attributes</a>
</div>
<div class="doc_text">
<p>Function attributes are set to communicate additional information about a
function. Function attributes are considered to be part of the function, not
of the function type, so functions with different parameter attributes can
have the same function type.</p>
<p>Function attributes are simple keywords that follow the type specified. If
multiple attributes are needed, they are space separated. For example:</p>
<div class="doc_code">
<pre>
define void @f() noinline { ... }
define void @f() alwaysinline { ... }
define void @f() alwaysinline optsize { ... }
define void @f() optsize
</pre>
</div>
<dl>
<dt><tt>alwaysinline</tt></dt>
<dd>This attribute indicates that the inliner should attempt to inline this
function into callers whenever possible, ignoring any active inlining size
threshold for this caller.</dd>
<dt><tt>inlinehint</tt></dt>
<dd>This attribute indicates that the source code contained a hint that inlining
this function is desirable (such as the "inline" keyword in C/C++). It
is just a hint; it imposes no requirements on the inliner.</dd>
<dt><tt>noinline</tt></dt>
<dd>This attribute indicates that the inliner should never inline this
function in any situation. This attribute may not be used together with
the <tt>alwaysinline</tt> attribute.</dd>
<dt><tt>optsize</tt></dt>
<dd>This attribute suggests that optimization passes and code generator passes
make choices that keep the code size of this function low, and otherwise
do optimizations specifically to reduce code size.</dd>
<dt><tt>noreturn</tt></dt>
<dd>This function attribute indicates that the function never returns
normally. This produces undefined behavior at runtime if the function
ever does dynamically return.</dd>
<dt><tt>nounwind</tt></dt>
<dd>This function attribute indicates that the function never returns with an
unwind or exceptional control flow. If the function does unwind, its
runtime behavior is undefined.</dd>
<dt><tt>readnone</tt></dt>
<dd>This attribute indicates that the function computes its result (or decides
to unwind an exception) based strictly on its arguments, without
dereferencing any pointer arguments or otherwise accessing any mutable
state (e.g. memory, control registers, etc) visible to caller functions.
It does not write through any pointer arguments
(including <tt><a href="#byval">byval</a></tt> arguments) and never
changes any state visible to callers. This means that it cannot unwind
exceptions by calling the <tt>C++</tt> exception throwing methods, but
could use the <tt>unwind</tt> instruction.</dd>
<dt><tt><a name="readonly">readonly</a></tt></dt>
<dd>This attribute indicates that the function does not write through any
pointer arguments (including <tt><a href="#byval">byval</a></tt>
arguments) or otherwise modify any state (e.g. memory, control registers,
etc) visible to caller functions. It may dereference pointer arguments
and read state that may be set in the caller. A readonly function always
returns the same value (or unwinds an exception identically) when called
with the same set of arguments and global state. It cannot unwind an
exception by calling the <tt>C++</tt> exception throwing methods, but may
use the <tt>unwind</tt> instruction.</dd>
<dt><tt><a name="ssp">ssp</a></tt></dt>
<dd>This attribute indicates that the function should emit a stack smashing
protector. It is in the form of a "canary"&mdash;a random value placed on
the stack before the local variables that's checked upon return from the
function to see if it has been overwritten. A heuristic is used to
determine if a function needs stack protectors or not.<br>
<br>
If a function that has an <tt>ssp</tt> attribute is inlined into a
function that doesn't have an <tt>ssp</tt> attribute, then the resulting
function will have an <tt>ssp</tt> attribute.</dd>
<dt><tt>sspreq</tt></dt>
<dd>This attribute indicates that the function should <em>always</em> emit a
stack smashing protector. This overrides
the <tt><a href="#ssp">ssp</a></tt> function attribute.<br>
<br>
If a function that has an <tt>sspreq</tt> attribute is inlined into a
function that doesn't have an <tt>sspreq</tt> attribute or which has
an <tt>ssp</tt> attribute, then the resulting function will have
an <tt>sspreq</tt> attribute.</dd>
<dt><tt>noredzone</tt></dt>
<dd>This attribute indicates that the code generator should not use a red
zone, even if the target-specific ABI normally permits it.</dd>
<dt><tt>noimplicitfloat</tt></dt>
<dd>This attributes disables implicit floating point instructions.</dd>
<dt><tt>naked</tt></dt>
<dd>This attribute disables prologue / epilogue emission for the function.
This can have very system-specific consequences.</dd>
</dl>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="moduleasm">Module-Level Inline Assembly</a>
</div>
<div class="doc_text">
<p>Modules may contain "module-level inline asm" blocks, which corresponds to
the GCC "file scope inline asm" blocks. These blocks are internally
concatenated by LLVM and treated as a single unit, but may be separated in
the <tt>.ll</tt> file if desired. The syntax is very simple:</p>
<div class="doc_code">
<pre>
module asm "inline asm code goes here"
module asm "more can go here"
</pre>
</div>
<p>The strings can contain any character by escaping non-printable characters.
The escape sequence used is simply "\xx" where "xx" is the two digit hex code
for the number.</p>
<p>The inline asm code is simply printed to the machine code .s file when
assembly code is generated.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="datalayout">Data Layout</a>
</div>
<div class="doc_text">
<p>A module may specify a target specific data layout string that specifies how
data is to be laid out in memory. The syntax for the data layout is
simply:</p>
<div class="doc_code">
<pre>
target datalayout = "<i>layout specification</i>"
</pre>
</div>
<p>The <i>layout specification</i> consists of a list of specifications
separated by the minus sign character ('-'). Each specification starts with
a letter and may include other information after the letter to define some
aspect of the data layout. The specifications accepted are as follows:</p>
<dl>
<dt><tt>E</tt></dt>
<dd>Specifies that the target lays out data in big-endian form. That is, the
bits with the most significance have the lowest address location.</dd>
<dt><tt>e</tt></dt>
<dd>Specifies that the target lays out data in little-endian form. That is,
the bits with the least significance have the lowest address
location.</dd>
<dt><tt>p:<i>size</i>:<i>abi</i>:<i>pref</i></tt></dt>
<dd>This specifies the <i>size</i> of a pointer and its <i>abi</i> and
<i>preferred</i> alignments. All sizes are in bits. Specifying
the <i>pref</i> alignment is optional. If omitted, the
preceding <tt>:</tt> should be omitted too.</dd>
<dt><tt>i<i>size</i>:<i>abi</i>:<i>pref</i></tt></dt>
<dd>This specifies the alignment for an integer type of a given bit
<i>size</i>. The value of <i>size</i> must be in the range [1,2^23).</dd>
<dt><tt>v<i>size</i>:<i>abi</i>:<i>pref</i></tt></dt>
<dd>This specifies the alignment for a vector type of a given bit
<i>size</i>.</dd>
<dt><tt>f<i>size</i>:<i>abi</i>:<i>pref</i></tt></dt>
<dd>This specifies the alignment for a floating point type of a given bit
<i>size</i>. The value of <i>size</i> must be either 32 (float) or 64
(double).</dd>
<dt><tt>a<i>size</i>:<i>abi</i>:<i>pref</i></tt></dt>
<dd>This specifies the alignment for an aggregate type of a given bit
<i>size</i>.</dd>
<dt><tt>s<i>size</i>:<i>abi</i>:<i>pref</i></tt></dt>
<dd>This specifies the alignment for a stack object of a given bit
<i>size</i>.</dd>
</dl>
<p>When constructing the data layout for a given target, LLVM starts with a
default set of specifications which are then (possibly) overriden by the
specifications in the <tt>datalayout</tt> keyword. The default specifications
are given in this list:</p>
<ul>
<li><tt>E</tt> - big endian</li>
<li><tt>p:32:64:64</tt> - 32-bit pointers with 64-bit alignment</li>
<li><tt>i1:8:8</tt> - i1 is 8-bit (byte) aligned</li>
<li><tt>i8:8:8</tt> - i8 is 8-bit (byte) aligned</li>
<li><tt>i16:16:16</tt> - i16 is 16-bit aligned</li>
<li><tt>i32:32:32</tt> - i32 is 32-bit aligned</li>
<li><tt>i64:32:64</tt> - i64 has ABI alignment of 32-bits but preferred
alignment of 64-bits</li>
<li><tt>f32:32:32</tt> - float is 32-bit aligned</li>
<li><tt>f64:64:64</tt> - double is 64-bit aligned</li>
<li><tt>v64:64:64</tt> - 64-bit vector is 64-bit aligned</li>
<li><tt>v128:128:128</tt> - 128-bit vector is 128-bit aligned</li>
<li><tt>a0:0:1</tt> - aggregates are 8-bit aligned</li>
<li><tt>s0:64:64</tt> - stack objects are 64-bit aligned</li>
</ul>
<p>When LLVM is determining the alignment for a given type, it uses the
following rules:</p>
<ol>
<li>If the type sought is an exact match for one of the specifications, that
specification is used.</li>
<li>If no match is found, and the type sought is an integer type, then the
smallest integer type that is larger than the bitwidth of the sought type
is used. If none of the specifications are larger than the bitwidth then
the the largest integer type is used. For example, given the default
specifications above, the i7 type will use the alignment of i8 (next
largest) while both i65 and i256 will use the alignment of i64 (largest
specified).</li>
<li>If no match is found, and the type sought is a vector type, then the
largest vector type that is smaller than the sought vector type will be
used as a fall back. This happens because &lt;128 x double&gt; can be
implemented in terms of 64 &lt;2 x double&gt;, for example.</li>
</ol>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="pointeraliasing">Pointer Aliasing Rules</a>
</div>
<div class="doc_text">
<p>Any memory access must be done through a pointer value associated
with an address range of the memory access, otherwise the behavior
is undefined. Pointer values are associated with address ranges
according to the following rules:</p>
<ul>
<li>A pointer value formed from a
<tt><a href="#i_getelementptr">getelementptr</a></tt> instruction
is associated with the addresses associated with the first operand
of the <tt>getelementptr</tt>.</li>
<li>An address of a global variable is associated with the address
range of the variable's storage.</li>
<li>The result value of an allocation instruction is associated with
the address range of the allocated storage.</li>
<li>A null pointer in the default address-space is associated with
no address.</li>
<li>A pointer value formed by an
<tt><a href="#i_inttoptr">inttoptr</a></tt> is associated with all
address ranges of all pointer values that contribute (directly or
indirectly) to the computation of the pointer's value.</li>
<li>The result value of a
<tt><a href="#i_bitcast">bitcast</a></tt> is associated with all
addresses associated with the operand of the <tt>bitcast</tt>.</li>
<li>An integer constant other than zero or a pointer value returned
from a function not defined within LLVM may be associated with address
ranges allocated through mechanisms other than those provided by
LLVM. Such ranges shall not overlap with any ranges of addresses
allocated by mechanisms provided by LLVM.</li>
</ul>
<p>LLVM IR does not associate types with memory. The result type of a
<tt><a href="#i_load">load</a></tt> merely indicates the size and
alignment of the memory from which to load, as well as the
interpretation of the value. The first operand of a
<tt><a href="#i_store">store</a></tt> similarly only indicates the size
and alignment of the store.</p>
<p>Consequently, type-based alias analysis, aka TBAA, aka
<tt>-fstrict-aliasing</tt>, is not applicable to general unadorned
LLVM IR. <a href="#metadata">Metadata</a> may be used to encode
additional information which specialized optimization passes may use
to implement type-based alias analysis.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="typesystem">Type System</a> </div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>The LLVM type system is one of the most important features of the
intermediate representation. Being typed enables a number of optimizations
to be performed on the intermediate representation directly, without having
to do extra analyses on the side before the transformation. A strong type
system makes it easier to read the generated code and enables novel analyses
and transformations that are not feasible to perform on normal three address
code representations.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="t_classifications">Type
Classifications</a> </div>
<div class="doc_text">
<p>The types fall into a few useful classifications:</p>
<table border="1" cellspacing="0" cellpadding="4">
<tbody>
<tr><th>Classification</th><th>Types</th></tr>
<tr>
<td><a href="#t_integer">integer</a></td>
<td><tt>i1, i2, i3, ... i8, ... i16, ... i32, ... i64, ... </tt></td>
</tr>
<tr>
<td><a href="#t_floating">floating point</a></td>
<td><tt>float, double, x86_fp80, fp128, ppc_fp128</tt></td>
</tr>
<tr>
<td><a name="t_firstclass">first class</a></td>
<td><a href="#t_integer">integer</a>,
<a href="#t_floating">floating point</a>,
<a href="#t_pointer">pointer</a>,
<a href="#t_vector">vector</a>,
<a href="#t_struct">structure</a>,
<a href="#t_array">array</a>,
<a href="#t_label">label</a>,
<a href="#t_metadata">metadata</a>.
</td>
</tr>
<tr>
<td><a href="#t_primitive">primitive</a></td>
<td><a href="#t_label">label</a>,
<a href="#t_void">void</a>,
<a href="#t_floating">floating point</a>,
<a href="#t_metadata">metadata</a>.</td>
</tr>
<tr>
<td><a href="#t_derived">derived</a></td>
<td><a href="#t_integer">integer</a>,
<a href="#t_array">array</a>,
<a href="#t_function">function</a>,
<a href="#t_pointer">pointer</a>,
<a href="#t_struct">structure</a>,
<a href="#t_pstruct">packed structure</a>,
<a href="#t_vector">vector</a>,
<a href="#t_opaque">opaque</a>.
</td>
</tr>
</tbody>
</table>
<p>The <a href="#t_firstclass">first class</a> types are perhaps the most
important. Values of these types are the only ones which can be produced by
instructions.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="t_primitive">Primitive Types</a> </div>
<div class="doc_text">
<p>The primitive types are the fundamental building blocks of the LLVM
system.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_integer">Integer Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>The integer type is a very simple type that simply specifies an arbitrary
bit width for the integer type desired. Any bit width from 1 bit to
2<sup>23</sup>-1 (about 8 million) can be specified.</p>
<h5>Syntax:</h5>
<pre>
iN
</pre>
<p>The number of bits the integer will occupy is specified by the <tt>N</tt>
value.</p>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>i1</tt></td>
<td class="left">a single-bit integer.</td>
</tr>
<tr class="layout">
<td class="left"><tt>i32</tt></td>
<td class="left">a 32-bit integer.</td>
</tr>
<tr class="layout">
<td class="left"><tt>i1942652</tt></td>
<td class="left">a really big integer of over 1 million bits.</td>
</tr>
</table>
<p>Note that the code generator does not yet support large integer types to be
used as function return types. The specific limit on how large a return type
the code generator can currently handle is target-dependent; currently it's
often 64 bits for 32-bit targets and 128 bits for 64-bit targets.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_floating">Floating Point Types</a> </div>
<div class="doc_text">
<table>
<tbody>
<tr><th>Type</th><th>Description</th></tr>
<tr><td><tt>float</tt></td><td>32-bit floating point value</td></tr>
<tr><td><tt>double</tt></td><td>64-bit floating point value</td></tr>
<tr><td><tt>fp128</tt></td><td>128-bit floating point value (112-bit mantissa)</td></tr>
<tr><td><tt>x86_fp80</tt></td><td>80-bit floating point value (X87)</td></tr>
<tr><td><tt>ppc_fp128</tt></td><td>128-bit floating point value (two 64-bits)</td></tr>
</tbody>
</table>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_void">Void Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>The void type does not represent any value and has no size.</p>
<h5>Syntax:</h5>
<pre>
void
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_label">Label Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>The label type represents code labels.</p>
<h5>Syntax:</h5>
<pre>
label
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_metadata">Metadata Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>The metadata type represents embedded metadata. No derived types may be
created from metadata except for <a href="#t_function">function</a>
arguments.
<h5>Syntax:</h5>
<pre>
metadata
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="t_derived">Derived Types</a> </div>
<div class="doc_text">
<p>The real power in LLVM comes from the derived types in the system. This is
what allows a programmer to represent arrays, functions, pointers, and other
useful types. Each of these types contain one or more element types which
may be a primitive type, or another derived type. For example, it is
possible to have a two dimensional array, using an array as the element type
of another array.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_array">Array Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>The array type is a very simple derived type that arranges elements
sequentially in memory. The array type requires a size (number of elements)
and an underlying data type.</p>
<h5>Syntax:</h5>
<pre>
[&lt;# elements&gt; x &lt;elementtype&gt;]
</pre>
<p>The number of elements is a constant integer value; <tt>elementtype</tt> may
be any type with a size.</p>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>[40 x i32]</tt></td>
<td class="left">Array of 40 32-bit integer values.</td>
</tr>
<tr class="layout">
<td class="left"><tt>[41 x i32]</tt></td>
<td class="left">Array of 41 32-bit integer values.</td>
</tr>
<tr class="layout">
<td class="left"><tt>[4 x i8]</tt></td>
<td class="left">Array of 4 8-bit integer values.</td>
</tr>
</table>
<p>Here are some examples of multidimensional arrays:</p>
<table class="layout">
<tr class="layout">
<td class="left"><tt>[3 x [4 x i32]]</tt></td>
<td class="left">3x4 array of 32-bit integer values.</td>
</tr>
<tr class="layout">
<td class="left"><tt>[12 x [10 x float]]</tt></td>
<td class="left">12x10 array of single precision floating point values.</td>
</tr>
<tr class="layout">
<td class="left"><tt>[2 x [3 x [4 x i16]]]</tt></td>
<td class="left">2x3x4 array of 16-bit integer values.</td>
</tr>
</table>
<p>Note that 'variable sized arrays' can be implemented in LLVM with a zero
length array. Normally, accesses past the end of an array are undefined in
LLVM (e.g. it is illegal to access the 5th element of a 3 element array). As
a special case, however, zero length arrays are recognized to be variable
length. This allows implementation of 'pascal style arrays' with the LLVM
type "<tt>{ i32, [0 x float]}</tt>", for example.</p>
<p>Note that the code generator does not yet support large aggregate types to be
used as function return types. The specific limit on how large an aggregate
return type the code generator can currently handle is target-dependent, and
also dependent on the aggregate element types.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_function">Function Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>The function type can be thought of as a function signature. It consists of
a return type and a list of formal parameter types. The return type of a
function type is a scalar type, a void type, or a struct type. If the return
type is a struct type then all struct elements must be of first class types,
and the struct must have at least one element.</p>
<h5>Syntax:</h5>
<pre>
&lt;returntype&gt; (&lt;parameter list&gt;)
</pre>
<p>...where '<tt>&lt;parameter list&gt;</tt>' is a comma-separated list of type
specifiers. Optionally, the parameter list may include a type <tt>...</tt>,
which indicates that the function takes a variable number of arguments.
Variable argument functions can access their arguments with
the <a href="#int_varargs">variable argument handling intrinsic</a>
functions. '<tt>&lt;returntype&gt;</tt>' is a any type except
<a href="#t_label">label</a>.</p>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>i32 (i32)</tt></td>
<td class="left">function taking an <tt>i32</tt>, returning an <tt>i32</tt>
</td>
</tr><tr class="layout">
<td class="left"><tt>float&nbsp;(i16&nbsp;signext,&nbsp;i32&nbsp;*)&nbsp;*
</tt></td>
<td class="left"><a href="#t_pointer">Pointer</a> to a function that takes
an <tt>i16</tt> that should be sign extended and a
<a href="#t_pointer">pointer</a> to <tt>i32</tt>, returning
<tt>float</tt>.
</td>
</tr><tr class="layout">
<td class="left"><tt>i32 (i8*, ...)</tt></td>
<td class="left">A vararg function that takes at least one
<a href="#t_pointer">pointer</a> to <tt>i8 </tt> (char in C),
which returns an integer. This is the signature for <tt>printf</tt> in
LLVM.
</td>
</tr><tr class="layout">
<td class="left"><tt>{i32, i32} (i32)</tt></td>
<td class="left">A function taking an <tt>i32</tt>, returning a
<a href="#t_struct">structure</a> containing two <tt>i32</tt> values
</td>
</tr>
</table>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_struct">Structure Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>The structure type is used to represent a collection of data members together
in memory. The packing of the field types is defined to match the ABI of the
underlying processor. The elements of a structure may be any type that has a
size.</p>
<p>Structures are accessed using '<tt><a href="#i_load">load</a></tt> and
'<tt><a href="#i_store">store</a></tt>' by getting a pointer to a field with
the '<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction.</p>
<h5>Syntax:</h5>
<pre>
{ &lt;type list&gt; }
</pre>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>{ i32, i32, i32 }</tt></td>
<td class="left">A triple of three <tt>i32</tt> values</td>
</tr><tr class="layout">
<td class="left"><tt>{&nbsp;float,&nbsp;i32&nbsp;(i32)&nbsp;*&nbsp;}</tt></td>
<td class="left">A pair, where the first element is a <tt>float</tt> and the
second element is a <a href="#t_pointer">pointer</a> to a
<a href="#t_function">function</a> that takes an <tt>i32</tt>, returning
an <tt>i32</tt>.</td>
</tr>
</table>
<p>Note that the code generator does not yet support large aggregate types to be
used as function return types. The specific limit on how large an aggregate
return type the code generator can currently handle is target-dependent, and
also dependent on the aggregate element types.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_pstruct">Packed Structure Type</a>
</div>
<div class="doc_text">
<h5>Overview:</h5>
<p>The packed structure type is used to represent a collection of data members
together in memory. There is no padding between fields. Further, the
alignment of a packed structure is 1 byte. The elements of a packed
structure may be any type that has a size.</p>
<p>Structures are accessed using '<tt><a href="#i_load">load</a></tt> and
'<tt><a href="#i_store">store</a></tt>' by getting a pointer to a field with
the '<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction.</p>
<h5>Syntax:</h5>
<pre>
&lt; { &lt;type list&gt; } &gt;
</pre>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>&lt; { i32, i32, i32 } &gt;</tt></td>
<td class="left">A triple of three <tt>i32</tt> values</td>
</tr><tr class="layout">
<td class="left">
<tt>&lt;&nbsp;{&nbsp;float,&nbsp;i32&nbsp;(i32)*&nbsp;}&nbsp;&gt;</tt></td>
<td class="left">A pair, where the first element is a <tt>float</tt> and the
second element is a <a href="#t_pointer">pointer</a> to a
<a href="#t_function">function</a> that takes an <tt>i32</tt>, returning
an <tt>i32</tt>.</td>
</tr>
</table>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_pointer">Pointer Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>As in many languages, the pointer type represents a pointer or reference to
another object, which must live in memory. Pointer types may have an optional
address space attribute defining the target-specific numbered address space
where the pointed-to object resides. The default address space is zero.</p>
<p>Note that LLVM does not permit pointers to void (<tt>void*</tt>) nor does it
permit pointers to labels (<tt>label*</tt>). Use <tt>i8*</tt> instead.</p>
<h5>Syntax:</h5>
<pre>
&lt;type&gt; *
</pre>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>[4 x i32]*</tt></td>
<td class="left">A <a href="#t_pointer">pointer</a> to <a
href="#t_array">array</a> of four <tt>i32</tt> values.</td>
</tr>
<tr class="layout">
<td class="left"><tt>i32 (i32 *) *</tt></td>
<td class="left"> A <a href="#t_pointer">pointer</a> to a <a
href="#t_function">function</a> that takes an <tt>i32*</tt>, returning an
<tt>i32</tt>.</td>
</tr>
<tr class="layout">
<td class="left"><tt>i32 addrspace(5)*</tt></td>
<td class="left">A <a href="#t_pointer">pointer</a> to an <tt>i32</tt> value
that resides in address space #5.</td>
</tr>
</table>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_vector">Vector Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>A vector type is a simple derived type that represents a vector of elements.
Vector types are used when multiple primitive data are operated in parallel
using a single instruction (SIMD). A vector type requires a size (number of
elements) and an underlying primitive data type. Vectors must have a power
of two length (1, 2, 4, 8, 16 ...). Vector types are considered
<a href="#t_firstclass">first class</a>.</p>
<h5>Syntax:</h5>
<pre>
&lt; &lt;# elements&gt; x &lt;elementtype&gt; &gt;
</pre>
<p>The number of elements is a constant integer value; elementtype may be any
integer or floating point type.</p>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>&lt;4 x i32&gt;</tt></td>
<td class="left">Vector of 4 32-bit integer values.</td>
</tr>
<tr class="layout">
<td class="left"><tt>&lt;8 x float&gt;</tt></td>
<td class="left">Vector of 8 32-bit floating-point values.</td>
</tr>
<tr class="layout">
<td class="left"><tt>&lt;2 x i64&gt;</tt></td>
<td class="left">Vector of 2 64-bit integer values.</td>
</tr>
</table>
<p>Note that the code generator does not yet support large vector types to be
used as function return types. The specific limit on how large a vector
return type codegen can currently handle is target-dependent; currently it's
often a few times longer than a hardware vector register.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="t_opaque">Opaque Type</a> </div>
<div class="doc_text">
<h5>Overview:</h5>
<p>Opaque types are used to represent unknown types in the system. This
corresponds (for example) to the C notion of a forward declared structure
type. In LLVM, opaque types can eventually be resolved to any type (not just
a structure type).</p>
<h5>Syntax:</h5>
<pre>
opaque
</pre>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>opaque</tt></td>
<td class="left">An opaque type.</td>
</tr>
</table>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="t_uprefs">Type Up-references</a>
</div>
<div class="doc_text">
<h5>Overview:</h5>
<p>An "up reference" allows you to refer to a lexically enclosing type without
requiring it to have a name. For instance, a structure declaration may
contain a pointer to any of the types it is lexically a member of. Example
of up references (with their equivalent as named type declarations)
include:</p>
<pre>
{ \2 * } %x = type { %x* }
{ \2 }* %y = type { %y }*
\1* %z = type %z*
</pre>
<p>An up reference is needed by the asmprinter for printing out cyclic types
when there is no declared name for a type in the cycle. Because the
asmprinter does not want to print out an infinite type string, it needs a
syntax to handle recursive types that have no names (all names are optional
in llvm IR).</p>
<h5>Syntax:</h5>
<pre>
\&lt;level&gt;
</pre>
<p>The level is the count of the lexical type that is being referred to.</p>
<h5>Examples:</h5>
<table class="layout">
<tr class="layout">
<td class="left"><tt>\1*</tt></td>
<td class="left">Self-referential pointer.</td>
</tr>
<tr class="layout">
<td class="left"><tt>{ { \3*, i8 }, i32 }</tt></td>
<td class="left">Recursive structure where the upref refers to the out-most
structure.</td>
</tr>
</table>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="constants">Constants</a> </div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>LLVM has several different basic types of constants. This section describes
them all and their syntax.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="simpleconstants">Simple Constants</a></div>
<div class="doc_text">
<dl>
<dt><b>Boolean constants</b></dt>
<dd>The two strings '<tt>true</tt>' and '<tt>false</tt>' are both valid
constants of the <tt><a href="#t_integer">i1</a></tt> type.</dd>
<dt><b>Integer constants</b></dt>
<dd>Standard integers (such as '4') are constants of
the <a href="#t_integer">integer</a> type. Negative numbers may be used
with integer types.</dd>
<dt><b>Floating point constants</b></dt>
<dd>Floating point constants use standard decimal notation (e.g. 123.421),
exponential notation (e.g. 1.23421e+2), or a more precise hexadecimal
notation (see below). The assembler requires the exact decimal value of a
floating-point constant. For example, the assembler accepts 1.25 but
rejects 1.3 because 1.3 is a repeating decimal in binary. Floating point
constants must have a <a href="#t_floating">floating point</a> type. </dd>
<dt><b>Null pointer constants</b></dt>
<dd>The identifier '<tt>null</tt>' is recognized as a null pointer constant
and must be of <a href="#t_pointer">pointer type</a>.</dd>
</dl>
<p>The one non-intuitive notation for constants is the hexadecimal form of
floating point constants. For example, the form '<tt>double
0x432ff973cafa8000</tt>' is equivalent to (but harder to read than)
'<tt>double 4.5e+15</tt>'. The only time hexadecimal floating point
constants are required (and the only time that they are generated by the
disassembler) is when a floating point constant must be emitted but it cannot
be represented as a decimal floating point number in a reasonable number of
digits. For example, NaN's, infinities, and other special values are
represented in their IEEE hexadecimal format so that assembly and disassembly
do not cause any bits to change in the constants.</p>
<p>When using the hexadecimal form, constants of types float and double are
represented using the 16-digit form shown above (which matches the IEEE754
representation for double); float values must, however, be exactly
representable as IEE754 single precision. Hexadecimal format is always used
for long double, and there are three forms of long double. The 80-bit format
used by x86 is represented as <tt>0xK</tt> followed by 20 hexadecimal digits.
The 128-bit format used by PowerPC (two adjacent doubles) is represented
by <tt>0xM</tt> followed by 32 hexadecimal digits. The IEEE 128-bit format
is represented by <tt>0xL</tt> followed by 32 hexadecimal digits; no
currently supported target uses this format. Long doubles will only work if
they match the long double format on your target. All hexadecimal formats
are big-endian (sign bit at the left).</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="aggregateconstants"></a> <!-- old anchor -->
<a name="complexconstants">Complex Constants</a>
</div>
<div class="doc_text">
<p>Complex constants are a (potentially recursive) combination of simple
constants and smaller complex constants.</p>
<dl>
<dt><b>Structure constants</b></dt>
<dd>Structure constants are represented with notation similar to structure
type definitions (a comma separated list of elements, surrounded by braces
(<tt>{}</tt>)). For example: "<tt>{ i32 4, float 17.0, i32* @G }</tt>",
where "<tt>@G</tt>" is declared as "<tt>@G = external global i32</tt>".
Structure constants must have <a href="#t_struct">structure type</a>, and
the number and types of elements must match those specified by the
type.</dd>
<dt><b>Array constants</b></dt>
<dd>Array constants are represented with notation similar to array type
definitions (a comma separated list of elements, surrounded by square
brackets (<tt>[]</tt>)). For example: "<tt>[ i32 42, i32 11, i32 74
]</tt>". Array constants must have <a href="#t_array">array type</a>, and
the number and types of elements must match those specified by the
type.</dd>
<dt><b>Vector constants</b></dt>
<dd>Vector constants are represented with notation similar to vector type
definitions (a comma separated list of elements, surrounded by
less-than/greater-than's (<tt>&lt;&gt;</tt>)). For example: "<tt>&lt; i32
42, i32 11, i32 74, i32 100 &gt;</tt>". Vector constants must
have <a href="#t_vector">vector type</a>, and the number and types of
elements must match those specified by the type.</dd>
<dt><b>Zero initialization</b></dt>
<dd>The string '<tt>zeroinitializer</tt>' can be used to zero initialize a
value to zero of <em>any</em> type, including scalar and aggregate types.
This is often used to avoid having to print large zero initializers
(e.g. for large arrays) and is always exactly equivalent to using explicit
zero initializers.</dd>
<dt><b>Metadata node</b></dt>
<dd>A metadata node is a structure-like constant with
<a href="#t_metadata">metadata type</a>. For example: "<tt>metadata !{
i32 0, metadata !"test" }</tt>". Unlike other constants that are meant to
be interpreted as part of the instruction stream, metadata is a place to
attach additional information such as debug info.</dd>
</dl>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="globalconstants">Global Variable and Function Addresses</a>
</div>
<div class="doc_text">
<p>The addresses of <a href="#globalvars">global variables</a>
and <a href="#functionstructure">functions</a> are always implicitly valid
(link-time) constants. These constants are explicitly referenced when
the <a href="#identifiers">identifier for the global</a> is used and always
have <a href="#t_pointer">pointer</a> type. For example, the following is a
legal LLVM file:</p>
<div class="doc_code">
<pre>
@X = global i32 17
@Y = global i32 42
@Z = global [2 x i32*] [ i32* @X, i32* @Y ]
</pre>
</div>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="undefvalues">Undefined Values</a></div>
<div class="doc_text">
<p>The string '<tt>undef</tt>' can be used anywhere a constant is expected, and
indicates that the user of the value may recieve an unspecified bit-pattern.
Undefined values may be of any type (other than label or void) and be used
anywhere a constant is permitted.</p>
<p>Undefined values are useful because they indicate to the compiler that the
program is well defined no matter what value is used. This gives the
compiler more freedom to optimize. Here are some examples of (potentially
surprising) transformations that are valid (in pseudo IR):</p>
<div class="doc_code">
<pre>
%A = add %X, undef
%B = sub %X, undef
%C = xor %X, undef
Safe:
%A = undef
%B = undef
%C = undef
</pre>
</div>
<p>This is safe because all of the output bits are affected by the undef bits.
Any output bit can have a zero or one depending on the input bits.</p>
<div class="doc_code">
<pre>
%A = or %X, undef
%B = and %X, undef
Safe:
%A = -1
%B = 0
Unsafe:
%A = undef
%B = undef
</pre>
</div>
<p>These logical operations have bits that are not always affected by the input.
For example, if "%X" has a zero bit, then the output of the 'and' operation will
always be a zero, no matter what the corresponding bit from the undef is. As
such, it is unsafe to optimize or assume that the result of the and is undef.
However, it is safe to assume that all bits of the undef could be 0, and
optimize the and to 0. Likewise, it is safe to assume that all the bits of
the undef operand to the or could be set, allowing the or to be folded to
-1.</p>
<div class="doc_code">
<pre>
%A = select undef, %X, %Y
%B = select undef, 42, %Y
%C = select %X, %Y, undef
Safe:
%A = %X (or %Y)
%B = 42 (or %Y)
%C = %Y
Unsafe:
%A = undef
%B = undef
%C = undef
</pre>
</div>
<p>This set of examples show that undefined select (and conditional branch)
conditions can go "either way" but they have to come from one of the two
operands. In the %A example, if %X and %Y were both known to have a clear low
bit, then %A would have to have a cleared low bit. However, in the %C example,
the optimizer is allowed to assume that the undef operand could be the same as
%Y, allowing the whole select to be eliminated.</p>
<div class="doc_code">
<pre>
%A = xor undef, undef
%B = undef
%C = xor %B, %B
%D = undef
%E = icmp lt %D, 4
%F = icmp gte %D, 4
Safe:
%A = undef
%B = undef
%C = undef
%D = undef
%E = undef
%F = undef
</pre>
</div>
<p>This example points out that two undef operands are not necessarily the same.
This can be surprising to people (and also matches C semantics) where they
assume that "X^X" is always zero, even if X is undef. This isn't true for a
number of reasons, but the short answer is that an undef "variable" can
arbitrarily change its value over its "live range". This is true because the
"variable" doesn't actually <em>have a live range</em>. Instead, the value is
logically read from arbitrary registers that happen to be around when needed,
so the value is not neccesarily consistent over time. In fact, %A and %C need
to have the same semantics or the core LLVM "replace all uses with" concept
would not hold.</p>
<div class="doc_code">
<pre>
%A = fdiv undef, %X
%B = fdiv %X, undef
Safe:
%A = undef
b: unreachable
</pre>
</div>
<p>These examples show the crucial difference between an <em>undefined
value</em> and <em>undefined behavior</em>. An undefined value (like undef) is
allowed to have an arbitrary bit-pattern. This means that the %A operation
can be constant folded to undef because the undef could be an SNaN, and fdiv is
not (currently) defined on SNaN's. However, in the second example, we can make
a more aggressive assumption: because the undef is allowed to be an arbitrary
value, we are allowed to assume that it could be zero. Since a divide by zero
has <em>undefined behavior</em>, we are allowed to assume that the operation
does not execute at all. This allows us to delete the divide and all code after
it: since the undefined operation "can't happen", the optimizer can assume that
it occurs in dead code.
</p>
<div class="doc_code">
<pre>
a: store undef -> %X
b: store %X -> undef
Safe:
a: &lt;deleted&gt;
b: unreachable
</pre>
</div>
<p>These examples reiterate the fdiv example: a store "of" an undefined value
can be assumed to not have any effect: we can assume that the value is
overwritten with bits that happen to match what was already there. However, a
store "to" an undefined location could clobber arbitrary memory, therefore, it
has undefined behavior.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="constantexprs">Constant Expressions</a>
</div>
<div class="doc_text">
<p>Constant expressions are used to allow expressions involving other constants
to be used as constants. Constant expressions may be of
any <a href="#t_firstclass">first class</a> type and may involve any LLVM
operation that does not have side effects (e.g. load and call are not
supported). The following is the syntax for constant expressions:</p>
<dl>
<dt><b><tt>trunc ( CST to TYPE )</tt></b></dt>
<dd>Truncate a constant to another type. The bit size of CST must be larger
than the bit size of TYPE. Both types must be integers.</dd>
<dt><b><tt>zext ( CST to TYPE )</tt></b></dt>
<dd>Zero extend a constant to another type. The bit size of CST must be
smaller or equal to the bit size of TYPE. Both types must be
integers.</dd>
<dt><b><tt>sext ( CST to TYPE )</tt></b></dt>
<dd>Sign extend a constant to another type. The bit size of CST must be
smaller or equal to the bit size of TYPE. Both types must be
integers.</dd>
<dt><b><tt>fptrunc ( CST to TYPE )</tt></b></dt>
<dd>Truncate a floating point constant to another floating point type. The
size of CST must be larger than the size of TYPE. Both types must be
floating point.</dd>
<dt><b><tt>fpext ( CST to TYPE )</tt></b></dt>
<dd>Floating point extend a constant to another type. The size of CST must be
smaller or equal to the size of TYPE. Both types must be floating
point.</dd>
<dt><b><tt>fptoui ( CST to TYPE )</tt></b></dt>
<dd>Convert a floating point constant to the corresponding unsigned integer
constant. TYPE must be a scalar or vector integer type. CST must be of
scalar or vector floating point type. Both CST and TYPE must be scalars,
or vectors of the same number of elements. If the value won't fit in the
integer type, the results are undefined.</dd>
<dt><b><tt>fptosi ( CST to TYPE )</tt></b></dt>
<dd>Convert a floating point constant to the corresponding signed integer
constant. TYPE must be a scalar or vector integer type. CST must be of
scalar or vector floating point type. Both CST and TYPE must be scalars,
or vectors of the same number of elements. If the value won't fit in the
integer type, the results are undefined.</dd>
<dt><b><tt>uitofp ( CST to TYPE )</tt></b></dt>
<dd>Convert an unsigned integer constant to the corresponding floating point
constant. TYPE must be a scalar or vector floating point type. CST must be
of scalar or vector integer type. Both CST and TYPE must be scalars, or
vectors of the same number of elements. If the value won't fit in the
floating point type, the results are undefined.</dd>
<dt><b><tt>sitofp ( CST to TYPE )</tt></b></dt>
<dd>Convert a signed integer constant to the corresponding floating point
constant. TYPE must be a scalar or vector floating point type. CST must be
of scalar or vector integer type. Both CST and TYPE must be scalars, or
vectors of the same number of elements. If the value won't fit in the
floating point type, the results are undefined.</dd>
<dt><b><tt>ptrtoint ( CST to TYPE )</tt></b></dt>
<dd>Convert a pointer typed constant to the corresponding integer constant
<tt>TYPE</tt> must be an integer type. <tt>CST</tt> must be of pointer
type. The <tt>CST</tt> value is zero extended, truncated, or unchanged to
make it fit in <tt>TYPE</tt>.</dd>
<dt><b><tt>inttoptr ( CST to TYPE )</tt></b></dt>
<dd>Convert a integer constant to a pointer constant. TYPE must be a pointer
type. CST must be of integer type. The CST value is zero extended,
truncated, or unchanged to make it fit in a pointer size. This one is
<i>really</i> dangerous!</dd>
<dt><b><tt>bitcast ( CST to TYPE )</tt></b></dt>
<dd>Convert a constant, CST, to another TYPE. The constraints of the operands
are the same as those for the <a href="#i_bitcast">bitcast
instruction</a>.</dd>
<dt><b><tt>getelementptr ( CSTPTR, IDX0, IDX1, ... )</tt></b></dt>
<dt><b><tt>getelementptr inbounds ( CSTPTR, IDX0, IDX1, ... )</tt></b></dt>
<dd>Perform the <a href="#i_getelementptr">getelementptr operation</a> on
constants. As with the <a href="#i_getelementptr">getelementptr</a>
instruction, the index list may have zero or more indexes, which are
required to make sense for the type of "CSTPTR".</dd>
<dt><b><tt>select ( COND, VAL1, VAL2 )</tt></b></dt>
<dd>Perform the <a href="#i_select">select operation</a> on constants.</dd>
<dt><b><tt>icmp COND ( VAL1, VAL2 )</tt></b></dt>
<dd>Performs the <a href="#i_icmp">icmp operation</a> on constants.</dd>
<dt><b><tt>fcmp COND ( VAL1, VAL2 )</tt></b></dt>
<dd>Performs the <a href="#i_fcmp">fcmp operation</a> on constants.</dd>
<dt><b><tt>extractelement ( VAL, IDX )</tt></b></dt>
<dd>Perform the <a href="#i_extractelement">extractelement operation</a> on
constants.</dd>
<dt><b><tt>insertelement ( VAL, ELT, IDX )</tt></b></dt>
<dd>Perform the <a href="#i_insertelement">insertelement operation</a> on
constants.</dd>
<dt><b><tt>shufflevector ( VEC1, VEC2, IDXMASK )</tt></b></dt>
<dd>Perform the <a href="#i_shufflevector">shufflevector operation</a> on
constants.</dd>
<dt><b><tt>OPCODE ( LHS, RHS )</tt></b></dt>
<dd>Perform the specified operation of the LHS and RHS constants. OPCODE may
be any of the <a href="#binaryops">binary</a>
or <a href="#bitwiseops">bitwise binary</a> operations. The constraints
on operands are the same as those for the corresponding instruction
(e.g. no bitwise operations on floating point values are allowed).</dd>
</dl>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"><a name="metadata">Embedded Metadata</a>
</div>
<div class="doc_text">
<p>Embedded metadata provides a way to attach arbitrary data to the instruction
stream without affecting the behaviour of the program. There are two
metadata primitives, strings and nodes. All metadata has the
<tt>metadata</tt> type and is identified in syntax by a preceding exclamation
point ('<tt>!</tt>').</p>
<p>A metadata string is a string surrounded by double quotes. It can contain
any character by escaping non-printable characters with "\xx" where "xx" is
the two digit hex code. For example: "<tt>!"test\00"</tt>".</p>
<p>Metadata nodes are represented with notation similar to structure constants
(a comma separated list of elements, surrounded by braces and preceeded by an
exclamation point). For example: "<tt>!{ metadata !"test\00", i32
10}</tt>".</p>
<p>A metadata node will attempt to track changes to the values it holds. In the
event that a value is deleted, it will be replaced with a typeless
"<tt>null</tt>", such as "<tt>metadata !{null, i32 10}</tt>".</p>
<p>Optimizations may rely on metadata to provide additional information about
the program that isn't available in the instructions, or that isn't easily
computable. Similarly, the code generator may expect a certain metadata
format to be used to express debugging information.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="othervalues">Other Values</a> </div>
<!-- *********************************************************************** -->
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="inlineasm">Inline Assembler Expressions</a>
</div>
<div class="doc_text">
<p>LLVM supports inline assembler expressions (as opposed
to <a href="#moduleasm"> Module-Level Inline Assembly</a>) through the use of
a special value. This value represents the inline assembler as a string
(containing the instructions to emit), a list of operand constraints (stored
as a string), and a flag that indicates whether or not the inline asm
expression has side effects. An example inline assembler expression is:</p>
<div class="doc_code">
<pre>
i32 (i32) asm "bswap $0", "=r,r"
</pre>
</div>
<p>Inline assembler expressions may <b>only</b> be used as the callee operand of
a <a href="#i_call"><tt>call</tt> instruction</a>. Thus, typically we
have:</p>
<div class="doc_code">
<pre>
%X = call i32 asm "<a href="#int_bswap">bswap</a> $0", "=r,r"(i32 %Y)
</pre>
</div>
<p>Inline asms with side effects not visible in the constraint list must be
marked as having side effects. This is done through the use of the
'<tt>sideeffect</tt>' keyword, like so:</p>
<div class="doc_code">
<pre>
call void asm sideeffect "eieio", ""()
</pre>
</div>
<p>TODO: The format of the asm and constraints string still need to be
documented here. Constraints on what can be done (e.g. duplication, moving,
etc need to be documented). This is probably best done by reference to
another document that covers inline asm from a holistic perspective.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section">
<a name="intrinsic_globals">Intrinsic Global Variables</a>
</div>
<!-- *********************************************************************** -->
<p>LLVM has a number of "magic" global variables that contain data that affect
code generation or other IR semantics. These are documented here. All globals
of this sort should have a section specified as "<tt>llvm.metadata</tt>". This
section and all globals that start with "<tt>llvm.</tt>" are reserved for use
by LLVM.</p>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="intg_used">The '<tt>llvm.used</tt>' Global Variable</a>
</div>
<div class="doc_text">
<p>The <tt>@llvm.used</tt> global is an array with i8* element type which has <a
href="#linkage_appending">appending linkage</a>. This array contains a list of
pointers to global variables and functions which may optionally have a pointer
cast formed of bitcast or getelementptr. For example, a legal use of it is:</p>
<pre>
@X = global i8 4
@Y = global i32 123
@llvm.used = appending global [2 x i8*] [
i8* @X,
i8* bitcast (i32* @Y to i8*)
], section "llvm.metadata"
</pre>
<p>If a global variable appears in the <tt>@llvm.used</tt> list, then the
compiler, assembler, and linker are required to treat the symbol as if there is
a reference to the global that it cannot see. For example, if a variable has
internal linkage and no references other than that from the <tt>@llvm.used</tt>
list, it cannot be deleted. This is commonly used to represent references from
inline asms and other things the compiler cannot "see", and corresponds to
"attribute((used))" in GNU C.</p>
<p>On some targets, the code generator must emit a directive to the assembler or
object file to prevent the assembler and linker from molesting the symbol.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="intg_compiler_used">The '<tt>llvm.compiler.used</tt>' Global Variable</a>
</div>
<div class="doc_text">
<p>The <tt>@llvm.compiler.used</tt> directive is the same as the
<tt>@llvm.used</tt> directive, except that it only prevents the compiler from
touching the symbol. On targets that support it, this allows an intelligent
linker to optimize references to the symbol without being impeded as it would be
by <tt>@llvm.used</tt>.</p>
<p>This is a rare construct that should only be used in rare circumstances, and
should not be exposed to source languages.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="intg_global_ctors">The '<tt>llvm.global_ctors</tt>' Global Variable</a>
</div>
<div class="doc_text">
<p>TODO: Describe this.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="intg_global_dtors">The '<tt>llvm.global_dtors</tt>' Global Variable</a>
</div>
<div class="doc_text">
<p>TODO: Describe this.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="instref">Instruction Reference</a> </div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>The LLVM instruction set consists of several different classifications of
instructions: <a href="#terminators">terminator
instructions</a>, <a href="#binaryops">binary instructions</a>,
<a href="#bitwiseops">bitwise binary instructions</a>,
<a href="#memoryops">memory instructions</a>, and
<a href="#otherops">other instructions</a>.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="terminators">Terminator
Instructions</a> </div>
<div class="doc_text">
<p>As mentioned <a href="#functionstructure">previously</a>, every basic block
in a program ends with a "Terminator" instruction, which indicates which
block should be executed after the current block is finished. These
terminator instructions typically yield a '<tt>void</tt>' value: they produce
control flow, not values (the one exception being the
'<a href="#i_invoke"><tt>invoke</tt></a>' instruction).</p>
<p>There are six different terminator instructions: the
'<a href="#i_ret"><tt>ret</tt></a>' instruction, the
'<a href="#i_br"><tt>br</tt></a>' instruction, the
'<a href="#i_switch"><tt>switch</tt></a>' instruction, the
'<a href="#i_invoke"><tt>invoke</tt></a>' instruction, the
'<a href="#i_unwind"><tt>unwind</tt></a>' instruction, and the
'<a href="#i_unreachable"><tt>unreachable</tt></a>' instruction.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_ret">'<tt>ret</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
ret &lt;type&gt; &lt;value&gt; <i>; Return a value from a non-void function</i>
ret void <i>; Return from void function</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>ret</tt>' instruction is used to return control flow (and optionally
a value) from a function back to the caller.</p>
<p>There are two forms of the '<tt>ret</tt>' instruction: one that returns a
value and then causes control flow, and one that just causes control flow to
occur.</p>
<h5>Arguments:</h5>
<p>The '<tt>ret</tt>' instruction optionally accepts a single argument, the
return value. The type of the return value must be a
'<a href="#t_firstclass">first class</a>' type.</p>
<p>A function is not <a href="#wellformed">well formed</a> if it it has a
non-void return type and contains a '<tt>ret</tt>' instruction with no return
value or a return value with a type that does not match its type, or if it
has a void return type and contains a '<tt>ret</tt>' instruction with a
return value.</p>
<h5>Semantics:</h5>
<p>When the '<tt>ret</tt>' instruction is executed, control flow returns back to
the calling function's context. If the caller is a
"<a href="#i_call"><tt>call</tt></a>" instruction, execution continues at the
instruction after the call. If the caller was an
"<a href="#i_invoke"><tt>invoke</tt></a>" instruction, execution continues at
the beginning of the "normal" destination block. If the instruction returns
a value, that value shall set the call or invoke instruction's return
value.</p>
<h5>Example:</h5>
<pre>
ret i32 5 <i>; Return an integer value of 5</i>
ret void <i>; Return from a void function</i>
ret { i32, i8 } { i32 4, i8 2 } <i>; Return a struct of values 4 and 2</i>
</pre>
<p>Note that the code generator does not yet fully support large
return values. The specific sizes that are currently supported are
dependent on the target. For integers, on 32-bit targets the limit
is often 64 bits, and on 64-bit targets the limit is often 128 bits.
For aggregate types, the current limits are dependent on the element
types; for example targets are often limited to 2 total integer
elements and 2 total floating-point elements.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_br">'<tt>br</tt>' Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
br i1 &lt;cond&gt;, label &lt;iftrue&gt;, label &lt;iffalse&gt;<br> br label &lt;dest&gt; <i>; Unconditional branch</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>br</tt>' instruction is used to cause control flow to transfer to a
different basic block in the current function. There are two forms of this
instruction, corresponding to a conditional branch and an unconditional
branch.</p>
<h5>Arguments:</h5>
<p>The conditional branch form of the '<tt>br</tt>' instruction takes a single
'<tt>i1</tt>' value and two '<tt>label</tt>' values. The unconditional form
of the '<tt>br</tt>' instruction takes a single '<tt>label</tt>' value as a
target.</p>
<h5>Semantics:</h5>
<p>Upon execution of a conditional '<tt>br</tt>' instruction, the '<tt>i1</tt>'
argument is evaluated. If the value is <tt>true</tt>, control flows to the
'<tt>iftrue</tt>' <tt>label</tt> argument. If "cond" is <tt>false</tt>,
control flows to the '<tt>iffalse</tt>' <tt>label</tt> argument.</p>
<h5>Example:</h5>
<pre>
Test:
%cond = <a href="#i_icmp">icmp</a> eq i32 %a, %b
br i1 %cond, label %IfEqual, label %IfUnequal
IfEqual:
<a href="#i_ret">ret</a> i32 1
IfUnequal:
<a href="#i_ret">ret</a> i32 0
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_switch">'<tt>switch</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
switch &lt;intty&gt; &lt;value&gt;, label &lt;defaultdest&gt; [ &lt;intty&gt; &lt;val&gt;, label &lt;dest&gt; ... ]
</pre>
<h5>Overview:</h5>
<p>The '<tt>switch</tt>' instruction is used to transfer control flow to one of
several different places. It is a generalization of the '<tt>br</tt>'
instruction, allowing a branch to occur to one of many possible
destinations.</p>
<h5>Arguments:</h5>
<p>The '<tt>switch</tt>' instruction uses three parameters: an integer
comparison value '<tt>value</tt>', a default '<tt>label</tt>' destination,
and an array of pairs of comparison value constants and '<tt>label</tt>'s.
The table is not allowed to contain duplicate constant entries.</p>
<h5>Semantics:</h5>
<p>The <tt>switch</tt> instruction specifies a table of values and
destinations. When the '<tt>switch</tt>' instruction is executed, this table
is searched for the given value. If the value is found, control flow is
transfered to the corresponding destination; otherwise, control flow is
transfered to the default destination.</p>
<h5>Implementation:</h5>
<p>Depending on properties of the target machine and the particular
<tt>switch</tt> instruction, this instruction may be code generated in
different ways. For example, it could be generated as a series of chained
conditional branches or with a lookup table.</p>
<h5>Example:</h5>
<pre>
<i>; Emulate a conditional br instruction</i>
%Val = <a href="#i_zext">zext</a> i1 %value to i32
switch i32 %Val, label %truedest [ i32 0, label %falsedest ]
<i>; Emulate an unconditional br instruction</i>
switch i32 0, label %dest [ ]
<i>; Implement a jump table:</i>
switch i32 %val, label %otherwise [ i32 0, label %onzero
i32 1, label %onone
i32 2, label %ontwo ]
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_invoke">'<tt>invoke</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = invoke [<a href="#callingconv">cconv</a>] [<a href="#paramattrs">ret attrs</a>] &lt;ptr to function ty&gt; &lt;function ptr val&gt;(&lt;function args&gt;) [<a href="#fnattrs">fn attrs</a>]
to label &lt;normal label&gt; unwind label &lt;exception label&gt;
</pre>
<h5>Overview:</h5>
<p>The '<tt>invoke</tt>' instruction causes control to transfer to a specified
function, with the possibility of control flow transfer to either the
'<tt>normal</tt>' label or the '<tt>exception</tt>' label. If the callee
function returns with the "<tt><a href="#i_ret">ret</a></tt>" instruction,
control flow will return to the "normal" label. If the callee (or any
indirect callees) returns with the "<a href="#i_unwind"><tt>unwind</tt></a>"
instruction, control is interrupted and continued at the dynamically nearest
"exception" label.</p>
<h5>Arguments:</h5>
<p>This instruction requires several arguments:</p>
<ol>
<li>The optional "cconv" marker indicates which <a href="#callingconv">calling
convention</a> the call should use. If none is specified, the call
defaults to using C calling conventions.</li>
<li>The optional <a href="#paramattrs">Parameter Attributes</a> list for
return values. Only '<tt>zeroext</tt>', '<tt>signext</tt>', and
'<tt>inreg</tt>' attributes are valid here.</li>
<li>'<tt>ptr to function ty</tt>': shall be the signature of the pointer to
function value being invoked. In most cases, this is a direct function
invocation, but indirect <tt>invoke</tt>s are just as possible, branching
off an arbitrary pointer to function value.</li>
<li>'<tt>function ptr val</tt>': An LLVM value containing a pointer to a
function to be invoked. </li>
<li>'<tt>function args</tt>': argument list whose types match the function
signature argument types. If the function signature indicates the
function accepts a variable number of arguments, the extra arguments can
be specified.</li>
<li>'<tt>normal label</tt>': the label reached when the called function
executes a '<tt><a href="#i_ret">ret</a></tt>' instruction. </li>
<li>'<tt>exception label</tt>': the label reached when a callee returns with
the <a href="#i_unwind"><tt>unwind</tt></a> instruction. </li>
<li>The optional <a href="#fnattrs">function attributes</a> list. Only
'<tt>noreturn</tt>', '<tt>nounwind</tt>', '<tt>readonly</tt>' and
'<tt>readnone</tt>' attributes are valid here.</li>
</ol>
<h5>Semantics:</h5>
<p>This instruction is designed to operate as a standard
'<tt><a href="#i_call">call</a></tt>' instruction in most regards. The
primary difference is that it establishes an association with a label, which
is used by the runtime library to unwind the stack.</p>
<p>This instruction is used in languages with destructors to ensure that proper
cleanup is performed in the case of either a <tt>longjmp</tt> or a thrown
exception. Additionally, this is important for implementation of
'<tt>catch</tt>' clauses in high-level languages that support them.</p>
<p>For the purposes of the SSA form, the definition of the value returned by the
'<tt>invoke</tt>' instruction is deemed to occur on the edge from the current
block to the "normal" label. If the callee unwinds then no return value is
available.</p>
<h5>Example:</h5>
<pre>
%retval = invoke i32 @Test(i32 15) to label %Continue
unwind label %TestCleanup <i>; {i32}:retval set</i>
%retval = invoke <a href="#callingconv">coldcc</a> i32 %Testfnptr(i32 15) to label %Continue
unwind label %TestCleanup <i>; {i32}:retval set</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_unwind">'<tt>unwind</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
unwind
</pre>
<h5>Overview:</h5>
<p>The '<tt>unwind</tt>' instruction unwinds the stack, continuing control flow
at the first callee in the dynamic call stack which used
an <a href="#i_invoke"><tt>invoke</tt></a> instruction to perform the call.
This is primarily used to implement exception handling.</p>
<h5>Semantics:</h5>
<p>The '<tt>unwind</tt>' instruction causes execution of the current function to
immediately halt. The dynamic call stack is then searched for the
first <a href="#i_invoke"><tt>invoke</tt></a> instruction on the call stack.
Once found, execution continues at the "exceptional" destination block
specified by the <tt>invoke</tt> instruction. If there is no <tt>invoke</tt>
instruction in the dynamic call chain, undefined behavior results.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_unreachable">'<tt>unreachable</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
unreachable
</pre>
<h5>Overview:</h5>
<p>The '<tt>unreachable</tt>' instruction has no defined semantics. This
instruction is used to inform the optimizer that a particular portion of the
code is not reachable. This can be used to indicate that the code after a
no-return function cannot be reached, and other facts.</p>
<h5>Semantics:</h5>
<p>The '<tt>unreachable</tt>' instruction has no defined semantics.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="binaryops">Binary Operations</a> </div>
<div class="doc_text">
<p>Binary operators are used to do most of the computation in a program. They
require two operands of the same type, execute an operation on them, and
produce a single value. The operands might represent multiple data, as is
the case with the <a href="#t_vector">vector</a> data type. The result value
has the same type as its operands.</p>
<p>There are several different binary operators:</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_add">'<tt>add</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = add &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = add nuw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = add nsw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = add nuw nsw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>add</tt>' instruction returns the sum of its two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>add</tt>' instruction must
be <a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of
integer values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the integer sum of the two operands.</p>
<p>If the sum has unsigned overflow, the result returned is the mathematical
result modulo 2<sup>n</sup>, where n is the bit width of the result.</p>
<p>Because LLVM integers use a two's complement representation, this instruction
is appropriate for both signed and unsigned integers.</p>
<p><tt>nuw</tt> and <tt>nsw</tt> stand for &quot;No Unsigned Wrap&quot;
and &quot;No Signed Wrap&quot;, respectively. If the <tt>nuw</tt> and/or
<tt>nsw</tt> keywords are present, the result value of the <tt>add</tt>
is undefined if unsigned and/or signed overflow, respectively, occurs.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = add i32 4, %var <i>; yields {i32}:result = 4 + %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_fadd">'<tt>fadd</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fadd &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fadd</tt>' instruction returns the sum of its two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>fadd</tt>' instruction must be
<a href="#t_floating">floating point</a> or <a href="#t_vector">vector</a> of
floating point values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the floating point sum of the two operands.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = fadd float 4.0, %var <i>; yields {float}:result = 4.0 + %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_sub">'<tt>sub</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = sub &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = sub nuw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = sub nsw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = sub nuw nsw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>sub</tt>' instruction returns the difference of its two
operands.</p>
<p>Note that the '<tt>sub</tt>' instruction is used to represent the
'<tt>neg</tt>' instruction present in most other intermediate
representations.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>sub</tt>' instruction must
be <a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of
integer values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the integer difference of the two operands.</p>
<p>If the difference has unsigned overflow, the result returned is the
mathematical result modulo 2<sup>n</sup>, where n is the bit width of the
result.</p>
<p>Because LLVM integers use a two's complement representation, this instruction
is appropriate for both signed and unsigned integers.</p>
<p><tt>nuw</tt> and <tt>nsw</tt> stand for &quot;No Unsigned Wrap&quot;
and &quot;No Signed Wrap&quot;, respectively. If the <tt>nuw</tt> and/or
<tt>nsw</tt> keywords are present, the result value of the <tt>sub</tt>
is undefined if unsigned and/or signed overflow, respectively, occurs.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = sub i32 4, %var <i>; yields {i32}:result = 4 - %var</i>
&lt;result&gt; = sub i32 0, %val <i>; yields {i32}:result = -%var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_fsub">'<tt>fsub</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fsub &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fsub</tt>' instruction returns the difference of its two
operands.</p>
<p>Note that the '<tt>fsub</tt>' instruction is used to represent the
'<tt>fneg</tt>' instruction present in most other intermediate
representations.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>fsub</tt>' instruction must be
<a href="#t_floating">floating point</a> or <a href="#t_vector">vector</a> of
floating point values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the floating point difference of the two operands.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = fsub float 4.0, %var <i>; yields {float}:result = 4.0 - %var</i>
&lt;result&gt; = fsub float -0.0, %val <i>; yields {float}:result = -%var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_mul">'<tt>mul</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = mul &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = mul nuw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = mul nsw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = mul nuw nsw &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>mul</tt>' instruction returns the product of its two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>mul</tt>' instruction must
be <a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of
integer values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the integer product of the two operands.</p>
<p>If the result of the multiplication has unsigned overflow, the result
returned is the mathematical result modulo 2<sup>n</sup>, where n is the bit
width of the result.</p>
<p>Because LLVM integers use a two's complement representation, and the result
is the same width as the operands, this instruction returns the correct
result for both signed and unsigned integers. If a full product
(e.g. <tt>i32</tt>x<tt>i32</tt>-><tt>i64</tt>) is needed, the operands should
be sign-extended or zero-extended as appropriate to the width of the full
product.</p>
<p><tt>nuw</tt> and <tt>nsw</tt> stand for &quot;No Unsigned Wrap&quot;
and &quot;No Signed Wrap&quot;, respectively. If the <tt>nuw</tt> and/or
<tt>nsw</tt> keywords are present, the result value of the <tt>mul</tt>
is undefined if unsigned and/or signed overflow, respectively, occurs.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = mul i32 4, %var <i>; yields {i32}:result = 4 * %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_fmul">'<tt>fmul</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fmul &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fmul</tt>' instruction returns the product of its two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>fmul</tt>' instruction must be
<a href="#t_floating">floating point</a> or <a href="#t_vector">vector</a> of
floating point values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the floating point product of the two operands.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = fmul float 4.0, %var <i>; yields {float}:result = 4.0 * %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_udiv">'<tt>udiv</tt>' Instruction
</a></div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = udiv &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>udiv</tt>' instruction returns the quotient of its two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>udiv</tt>' instruction must be
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the unsigned integer quotient of the two operands.</p>
<p>Note that unsigned integer division and signed integer division are distinct
operations; for signed integer division, use '<tt>sdiv</tt>'.</p>
<p>Division by zero leads to undefined behavior.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = udiv i32 4, %var <i>; yields {i32}:result = 4 / %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_sdiv">'<tt>sdiv</tt>' Instruction
</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = sdiv &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
&lt;result&gt; = sdiv exact &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>sdiv</tt>' instruction returns the quotient of its two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>sdiv</tt>' instruction must be
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the signed integer quotient of the two operands rounded
towards zero.</p>
<p>Note that signed integer division and unsigned integer division are distinct
operations; for unsigned integer division, use '<tt>udiv</tt>'.</p>
<p>Division by zero leads to undefined behavior. Overflow also leads to
undefined behavior; this is a rare case, but can occur, for example, by doing
a 32-bit division of -2147483648 by -1.</p>
<p>If the <tt>exact</tt> keyword is present, the result value of the
<tt>sdiv</tt> is undefined if the result would be rounded or if overflow
would occur.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = sdiv i32 4, %var <i>; yields {i32}:result = 4 / %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_fdiv">'<tt>fdiv</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fdiv &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fdiv</tt>' instruction returns the quotient of its two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>fdiv</tt>' instruction must be
<a href="#t_floating">floating point</a> or <a href="#t_vector">vector</a> of
floating point values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The value produced is the floating point quotient of the two operands.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = fdiv float 4.0, %var <i>; yields {float}:result = 4.0 / %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_urem">'<tt>urem</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = urem &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>urem</tt>' instruction returns the remainder from the unsigned
division of its two arguments.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>urem</tt>' instruction must be
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>This instruction returns the unsigned integer <i>remainder</i> of a division.
This instruction always performs an unsigned division to get the
remainder.</p>
<p>Note that unsigned integer remainder and signed integer remainder are
distinct operations; for signed integer remainder, use '<tt>srem</tt>'.</p>
<p>Taking the remainder of a division by zero leads to undefined behavior.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = urem i32 4, %var <i>; yields {i32}:result = 4 % %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_srem">'<tt>srem</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = srem &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>srem</tt>' instruction returns the remainder from the signed
division of its two operands. This instruction can also take
<a href="#t_vector">vector</a> versions of the values in which case the
elements must be integers.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>srem</tt>' instruction must be
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>This instruction returns the <i>remainder</i> of a division (where the result
has the same sign as the dividend, <tt>op1</tt>), not the <i>modulo</i>
operator (where the result has the same sign as the divisor, <tt>op2</tt>) of
a value. For more information about the difference,
see <a href="http://mathforum.org/dr.math/problems/anne.4.28.99.html">The
Math Forum</a>. For a table of how this is implemented in various languages,
please see <a href="http://en.wikipedia.org/wiki/Modulo_operation">
Wikipedia: modulo operation</a>.</p>
<p>Note that signed integer remainder and unsigned integer remainder are
distinct operations; for unsigned integer remainder, use '<tt>urem</tt>'.</p>
<p>Taking the remainder of a division by zero leads to undefined behavior.
Overflow also leads to undefined behavior; this is a rare case, but can
occur, for example, by taking the remainder of a 32-bit division of
-2147483648 by -1. (The remainder doesn't actually overflow, but this rule
lets srem be implemented using instructions that return both the result of
the division and the remainder.)</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = srem i32 4, %var <i>; yields {i32}:result = 4 % %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_frem">'<tt>frem</tt>' Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = frem &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>frem</tt>' instruction returns the remainder from the division of
its two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>frem</tt>' instruction must be
<a href="#t_floating">floating point</a> or <a href="#t_vector">vector</a> of
floating point values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>This instruction returns the <i>remainder</i> of a division. The remainder
has the same sign as the dividend.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = frem float 4.0, %var <i>; yields {float}:result = 4.0 % %var</i>
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="bitwiseops">Bitwise Binary
Operations</a> </div>
<div class="doc_text">
<p>Bitwise binary operators are used to do various forms of bit-twiddling in a
program. They are generally very efficient instructions and can commonly be
strength reduced from other instructions. They require two operands of the
same type, execute an operation on them, and produce a single value. The
resulting value is the same type as its operands.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_shl">'<tt>shl</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = shl &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>shl</tt>' instruction returns the first operand shifted to the left
a specified number of bits.</p>
<h5>Arguments:</h5>
<p>Both arguments to the '<tt>shl</tt>' instruction must be the
same <a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of
integer type. '<tt>op2</tt>' is treated as an unsigned value.</p>
<h5>Semantics:</h5>
<p>The value produced is <tt>op1</tt> * 2<sup><tt>op2</tt></sup> mod
2<sup>n</sup>, where <tt>n</tt> is the width of the result. If <tt>op2</tt>
is (statically or dynamically) negative or equal to or larger than the number
of bits in <tt>op1</tt>, the result is undefined. If the arguments are
vectors, each vector element of <tt>op1</tt> is shifted by the corresponding
shift amount in <tt>op2</tt>.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = shl i32 4, %var <i>; yields {i32}: 4 &lt;&lt; %var</i>
&lt;result&gt; = shl i32 4, 2 <i>; yields {i32}: 16</i>
&lt;result&gt; = shl i32 1, 10 <i>; yields {i32}: 1024</i>
&lt;result&gt; = shl i32 1, 32 <i>; undefined</i>
&lt;result&gt; = shl &lt;2 x i32&gt; &lt; i32 1, i32 1&gt;, &lt; i32 1, i32 2&gt; <i>; yields: result=&lt;2 x i32&gt; &lt; i32 2, i32 4&gt;</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_lshr">'<tt>lshr</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = lshr &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>lshr</tt>' instruction (logical shift right) returns the first
operand shifted to the right a specified number of bits with zero fill.</p>
<h5>Arguments:</h5>
<p>Both arguments to the '<tt>lshr</tt>' instruction must be the same
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
type. '<tt>op2</tt>' is treated as an unsigned value.</p>
<h5>Semantics:</h5>
<p>This instruction always performs a logical shift right operation. The most
significant bits of the result will be filled with zero bits after the shift.
If <tt>op2</tt> is (statically or dynamically) equal to or larger than the
number of bits in <tt>op1</tt>, the result is undefined. If the arguments are
vectors, each vector element of <tt>op1</tt> is shifted by the corresponding
shift amount in <tt>op2</tt>.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = lshr i32 4, 1 <i>; yields {i32}:result = 2</i>
&lt;result&gt; = lshr i32 4, 2 <i>; yields {i32}:result = 1</i>
&lt;result&gt; = lshr i8 4, 3 <i>; yields {i8}:result = 0</i>
&lt;result&gt; = lshr i8 -2, 1 <i>; yields {i8}:result = 0x7FFFFFFF </i>
&lt;result&gt; = lshr i32 1, 32 <i>; undefined</i>
&lt;result&gt; = lshr &lt;2 x i32&gt; &lt; i32 -2, i32 4&gt;, &lt; i32 1, i32 2&gt; <i>; yields: result=&lt;2 x i32&gt; &lt; i32 0x7FFFFFFF, i32 1&gt;</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_ashr">'<tt>ashr</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = ashr &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>ashr</tt>' instruction (arithmetic shift right) returns the first
operand shifted to the right a specified number of bits with sign
extension.</p>
<h5>Arguments:</h5>
<p>Both arguments to the '<tt>ashr</tt>' instruction must be the same
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
type. '<tt>op2</tt>' is treated as an unsigned value.</p>
<h5>Semantics:</h5>
<p>This instruction always performs an arithmetic shift right operation, The
most significant bits of the result will be filled with the sign bit
of <tt>op1</tt>. If <tt>op2</tt> is (statically or dynamically) equal to or
larger than the number of bits in <tt>op1</tt>, the result is undefined. If
the arguments are vectors, each vector element of <tt>op1</tt> is shifted by
the corresponding shift amount in <tt>op2</tt>.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = ashr i32 4, 1 <i>; yields {i32}:result = 2</i>
&lt;result&gt; = ashr i32 4, 2 <i>; yields {i32}:result = 1</i>
&lt;result&gt; = ashr i8 4, 3 <i>; yields {i8}:result = 0</i>
&lt;result&gt; = ashr i8 -2, 1 <i>; yields {i8}:result = -1</i>
&lt;result&gt; = ashr i32 1, 32 <i>; undefined</i>
&lt;result&gt; = ashr &lt;2 x i32&gt; &lt; i32 -2, i32 4&gt;, &lt; i32 1, i32 3&gt; <i>; yields: result=&lt;2 x i32&gt; &lt; i32 -1, i32 0&gt;</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_and">'<tt>and</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = and &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>and</tt>' instruction returns the bitwise logical and of its two
operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>and</tt>' instruction must be
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The truth table used for the '<tt>and</tt>' instruction is:</p>
<table border="1" cellspacing="0" cellpadding="4">
<tbody>
<tr>
<td>In0</td>
<td>In1</td>
<td>Out</td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>0</td>
<td>1</td>
<td>0</td>
</tr>
<tr>
<td>1</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
</tbody>
</table>
<h5>Example:</h5>
<pre>
&lt;result&gt; = and i32 4, %var <i>; yields {i32}:result = 4 &amp; %var</i>
&lt;result&gt; = and i32 15, 40 <i>; yields {i32}:result = 8</i>
&lt;result&gt; = and i32 4, 8 <i>; yields {i32}:result = 0</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_or">'<tt>or</tt>' Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = or &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>or</tt>' instruction returns the bitwise logical inclusive or of its
two operands.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>or</tt>' instruction must be
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The truth table used for the '<tt>or</tt>' instruction is:</p>
<table border="1" cellspacing="0" cellpadding="4">
<tbody>
<tr>
<td>In0</td>
<td>In1</td>
<td>Out</td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>1</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
</tbody>
</table>
<h5>Example:</h5>
<pre>
&lt;result&gt; = or i32 4, %var <i>; yields {i32}:result = 4 | %var</i>
&lt;result&gt; = or i32 15, 40 <i>; yields {i32}:result = 47</i>
&lt;result&gt; = or i32 4, 8 <i>; yields {i32}:result = 12</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_xor">'<tt>xor</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = xor &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>xor</tt>' instruction returns the bitwise logical exclusive or of
its two operands. The <tt>xor</tt> is used to implement the "one's
complement" operation, which is the "~" operator in C.</p>
<h5>Arguments:</h5>
<p>The two arguments to the '<tt>xor</tt>' instruction must be
<a href="#t_integer">integer</a> or <a href="#t_vector">vector</a> of integer
values. Both arguments must have identical types.</p>
<h5>Semantics:</h5>
<p>The truth table used for the '<tt>xor</tt>' instruction is:</p>
<table border="1" cellspacing="0" cellpadding="4">
<tbody>
<tr>
<td>In0</td>
<td>In1</td>
<td>Out</td>
</tr>
<tr>
<td>0</td>
<td>0</td>
<td>0</td>
</tr>
<tr>
<td>0</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>1</td>
<td>0</td>
<td>1</td>
</tr>
<tr>
<td>1</td>
<td>1</td>
<td>0</td>
</tr>
</tbody>
</table>
<h5>Example:</h5>
<pre>
&lt;result&gt; = xor i32 4, %var <i>; yields {i32}:result = 4 ^ %var</i>
&lt;result&gt; = xor i32 15, 40 <i>; yields {i32}:result = 39</i>
&lt;result&gt; = xor i32 4, 8 <i>; yields {i32}:result = 12</i>
&lt;result&gt; = xor i32 %V, -1 <i>; yields {i32}:result = ~%V</i>
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="vectorops">Vector Operations</a>
</div>
<div class="doc_text">
<p>LLVM supports several instructions to represent vector operations in a
target-independent manner. These instructions cover the element-access and
vector-specific operations needed to process vectors effectively. While LLVM
does directly support these vector operations, many sophisticated algorithms
will want to use target-specific intrinsics to take full advantage of a
specific target.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_extractelement">'<tt>extractelement</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = extractelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, i32 &lt;idx&gt; <i>; yields &lt;ty&gt;</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>extractelement</tt>' instruction extracts a single scalar element
from a vector at a specified index.</p>
<h5>Arguments:</h5>
<p>The first operand of an '<tt>extractelement</tt>' instruction is a value
of <a href="#t_vector">vector</a> type. The second operand is an index
indicating the position from which to extract the element. The index may be
a variable.</p>
<h5>Semantics:</h5>
<p>The result is a scalar of the same type as the element type of
<tt>val</tt>. Its value is the value at position <tt>idx</tt> of
<tt>val</tt>. If <tt>idx</tt> exceeds the length of <tt>val</tt>, the
results are undefined.</p>
<h5>Example:</h5>
<pre>
%result = extractelement &lt;4 x i32&gt; %vec, i32 0 <i>; yields i32</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_insertelement">'<tt>insertelement</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = insertelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, &lt;ty&gt; &lt;elt&gt;, i32 &lt;idx&gt; <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>insertelement</tt>' instruction inserts a scalar element into a
vector at a specified index.</p>
<h5>Arguments:</h5>
<p>The first operand of an '<tt>insertelement</tt>' instruction is a value
of <a href="#t_vector">vector</a> type. The second operand is a scalar value
whose type must equal the element type of the first operand. The third
operand is an index indicating the position at which to insert the value.
The index may be a variable.</p>
<h5>Semantics:</h5>
<p>The result is a vector of the same type as <tt>val</tt>. Its element values
are those of <tt>val</tt> except at position <tt>idx</tt>, where it gets the
value <tt>elt</tt>. If <tt>idx</tt> exceeds the length of <tt>val</tt>, the
results are undefined.</p>
<h5>Example:</h5>
<pre>
%result = insertelement &lt;4 x i32&gt; %vec, i32 1, i32 0 <i>; yields &lt;4 x i32&gt;</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_shufflevector">'<tt>shufflevector</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = shufflevector &lt;n x &lt;ty&gt;&gt; &lt;v1&gt;, &lt;n x &lt;ty&gt;&gt; &lt;v2&gt;, &lt;m x i32&gt; &lt;mask&gt; <i>; yields &lt;m x &lt;ty&gt;&gt;</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>shufflevector</tt>' instruction constructs a permutation of elements
from two input vectors, returning a vector with the same element type as the
input and length that is the same as the shuffle mask.</p>
<h5>Arguments:</h5>
<p>The first two operands of a '<tt>shufflevector</tt>' instruction are vectors
with types that match each other. The third argument is a shuffle mask whose
element type is always 'i32'. The result of the instruction is a vector
whose length is the same as the shuffle mask and whose element type is the
same as the element type of the first two operands.</p>
<p>The shuffle mask operand is required to be a constant vector with either
constant integer or undef values.</p>
<h5>Semantics:</h5>
<p>The elements of the two input vectors are numbered from left to right across
both of the vectors. The shuffle mask operand specifies, for each element of
the result vector, which element of the two input vectors the result element
gets. The element selector may be undef (meaning "don't care") and the
second operand may be undef if performing a shuffle from only one vector.</p>
<h5>Example:</h5>
<pre>
%result = shufflevector &lt;4 x i32&gt; %v1, &lt;4 x i32&gt; %v2,
&lt;4 x i32&gt; &lt;i32 0, i32 4, i32 1, i32 5&gt; <i>; yields &lt;4 x i32&gt;</i>
%result = shufflevector &lt;4 x i32&gt; %v1, &lt;4 x i32&gt; undef,
&lt;4 x i32&gt; &lt;i32 0, i32 1, i32 2, i32 3&gt; <i>; yields &lt;4 x i32&gt;</i> - Identity shuffle.
%result = shufflevector &lt;8 x i32&gt; %v1, &lt;8 x i32&gt; undef,
&lt;4 x i32&gt; &lt;i32 0, i32 1, i32 2, i32 3&gt; <i>; yields &lt;4 x i32&gt;</i>
%result = shufflevector &lt;4 x i32&gt; %v1, &lt;4 x i32&gt; %v2,
&lt;8 x i32&gt; &lt;i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7 &gt; <i>; yields &lt;8 x i32&gt;</i>
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="aggregateops">Aggregate Operations</a>
</div>
<div class="doc_text">
<p>LLVM supports several instructions for working with aggregate values.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_extractvalue">'<tt>extractvalue</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = extractvalue &lt;aggregate type&gt; &lt;val&gt;, &lt;idx&gt;{, &lt;idx&gt;}*
</pre>
<h5>Overview:</h5>
<p>The '<tt>extractvalue</tt>' instruction extracts the value of a struct field
or array element from an aggregate value.</p>
<h5>Arguments:</h5>
<p>The first operand of an '<tt>extractvalue</tt>' instruction is a value
of <a href="#t_struct">struct</a> or <a href="#t_array">array</a> type. The
operands are constant indices to specify which value to extract in a similar
manner as indices in a
'<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction.</p>
<h5>Semantics:</h5>
<p>The result is the value at the position in the aggregate specified by the
index operands.</p>
<h5>Example:</h5>
<pre>
%result = extractvalue {i32, float} %agg, 0 <i>; yields i32</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_insertvalue">'<tt>insertvalue</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = insertvalue &lt;aggregate type&gt; &lt;val&gt;, &lt;ty&gt; &lt;val&gt;, &lt;idx&gt; <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>insertvalue</tt>' instruction inserts a value into a struct field or
array element in an aggregate.</p>
<h5>Arguments:</h5>
<p>The first operand of an '<tt>insertvalue</tt>' instruction is a value
of <a href="#t_struct">struct</a> or <a href="#t_array">array</a> type. The
second operand is a first-class value to insert. The following operands are
constant indices indicating the position at which to insert the value in a
similar manner as indices in a
'<tt><a href="#i_getelementptr">getelementptr</a></tt>' instruction. The
value to insert must have the same type as the value identified by the
indices.</p>
<h5>Semantics:</h5>
<p>The result is an aggregate of the same type as <tt>val</tt>. Its value is
that of <tt>val</tt> except that the value at the position specified by the
indices is that of <tt>elt</tt>.</p>
<h5>Example:</h5>
<pre>
%result = insertvalue {i32, float} %agg, i32 1, 0 <i>; yields {i32, float}</i>
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="memoryops">Memory Access and Addressing Operations</a>
</div>
<div class="doc_text">
<p>A key design point of an SSA-based representation is how it represents
memory. In LLVM, no memory locations are in SSA form, which makes things
very simple. This section describes how to read, write, allocate, and free
memory in LLVM.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_malloc">'<tt>malloc</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = malloc &lt;type&gt;[, i32 &lt;NumElements&gt;][, align &lt;alignment&gt;] <i>; yields {type*}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>malloc</tt>' instruction allocates memory from the system heap and
returns a pointer to it. The object is always allocated in the generic
address space (address space zero).</p>
<h5>Arguments:</h5>
<p>The '<tt>malloc</tt>' instruction allocates
<tt>sizeof(&lt;type&gt;)*NumElements</tt> bytes of memory from the operating
system and returns a pointer of the appropriate type to the program. If
"NumElements" is specified, it is the number of elements allocated, otherwise
"NumElements" is defaulted to be one. If a constant alignment is specified,
the value result of the allocation is guaranteed to be aligned to at least
that boundary. If not specified, or if zero, the target can choose to align
the allocation on any convenient boundary compatible with the type.</p>
<p>'<tt>type</tt>' must be a sized type.</p>
<h5>Semantics:</h5>
<p>Memory is allocated using the system "<tt>malloc</tt>" function, and a
pointer is returned. The result of a zero byte allocation is undefined. The
result is null if there is insufficient memory available.</p>
<h5>Example:</h5>
<pre>
%array = malloc [4 x i8] <i>; yields {[%4 x i8]*}:array</i>
%size = <a href="#i_add">add</a> i32 2, 2 <i>; yields {i32}:size = i32 4</i>
%array1 = malloc i8, i32 4 <i>; yields {i8*}:array1</i>
%array2 = malloc [12 x i8], i32 %size <i>; yields {[12 x i8]*}:array2</i>
%array3 = malloc i32, i32 4, align 1024 <i>; yields {i32*}:array3</i>
%array4 = malloc i32, align 1024 <i>; yields {i32*}:array4</i>
</pre>
<p>Note that the code generator does not yet respect the alignment value.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_free">'<tt>free</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
free &lt;type&gt; &lt;value&gt; <i>; yields {void}</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>free</tt>' instruction returns memory back to the unused memory heap
to be reallocated in the future.</p>
<h5>Arguments:</h5>
<p>'<tt>value</tt>' shall be a pointer value that points to a value that was
allocated with the '<tt><a href="#i_malloc">malloc</a></tt>' instruction.</p>
<h5>Semantics:</h5>
<p>Access to the memory pointed to by the pointer is no longer defined after
this instruction executes. If the pointer is null, the operation is a
noop.</p>
<h5>Example:</h5>
<pre>
%array = <a href="#i_malloc">malloc</a> [4 x i8] <i>; yields {[4 x i8]*}:array</i>
free [4 x i8]* %array
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_alloca">'<tt>alloca</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = alloca &lt;type&gt;[, i32 &lt;NumElements&gt;][, align &lt;alignment&gt;] <i>; yields {type*}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>alloca</tt>' instruction allocates memory on the stack frame of the
currently executing function, to be automatically released when this function
returns to its caller. The object is always allocated in the generic address
space (address space zero).</p>
<h5>Arguments:</h5>
<p>The '<tt>alloca</tt>' instruction
allocates <tt>sizeof(&lt;type&gt;)*NumElements</tt> bytes of memory on the
runtime stack, returning a pointer of the appropriate type to the program.
If "NumElements" is specified, it is the number of elements allocated,
otherwise "NumElements" is defaulted to be one. If a constant alignment is
specified, the value result of the allocation is guaranteed to be aligned to
at least that boundary. If not specified, or if zero, the target can choose
to align the allocation on any convenient boundary compatible with the
type.</p>
<p>'<tt>type</tt>' may be any sized type.</p>
<h5>Semantics:</h5>
<p>Memory is allocated; a pointer is returned. The operation is undefined if
there is insufficient stack space for the allocation. '<tt>alloca</tt>'d
memory is automatically released when the function returns. The
'<tt>alloca</tt>' instruction is commonly used to represent automatic
variables that must have an address available. When the function returns
(either with the <tt><a href="#i_ret">ret</a></tt>
or <tt><a href="#i_unwind">unwind</a></tt> instructions), the memory is
reclaimed. Allocating zero bytes is legal, but the result is undefined.</p>
<h5>Example:</h5>
<pre>
%ptr = alloca i32 <i>; yields {i32*}:ptr</i>
%ptr = alloca i32, i32 4 <i>; yields {i32*}:ptr</i>
%ptr = alloca i32, i32 4, align 1024 <i>; yields {i32*}:ptr</i>
%ptr = alloca i32, align 1024 <i>; yields {i32*}:ptr</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_load">'<tt>load</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = load &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;]
&lt;result&gt; = volatile load &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;]
</pre>
<h5>Overview:</h5>
<p>The '<tt>load</tt>' instruction is used to read from memory.</p>
<h5>Arguments:</h5>
<p>The argument to the '<tt>load</tt>' instruction specifies the memory address
from which to load. The pointer must point to
a <a href="#t_firstclass">first class</a> type. If the <tt>load</tt> is
marked as <tt>volatile</tt>, then the optimizer is not allowed to modify the
number or order of execution of this <tt>load</tt> with other
volatile <tt>load</tt> and <tt><a href="#i_store">store</a></tt>
instructions. </p>
<p>The optional constant "align" argument specifies the alignment of the
operation (that is, the alignment of the memory address). A value of 0 or an
omitted "align" argument means that the operation has the preferential
alignment for the target. It is the responsibility of the code emitter to
ensure that the alignment information is correct. Overestimating the
alignment results in an undefined behavior. Underestimating the alignment may
produce less efficient code. An alignment of 1 is always safe.</p>
<h5>Semantics:</h5>
<p>The location of memory pointed to is loaded. If the value being loaded is of
scalar type then the number of bytes read does not exceed the minimum number
of bytes needed to hold all bits of the type. For example, loading an
<tt>i24</tt> reads at most three bytes. When loading a value of a type like
<tt>i20</tt> with a size that is not an integral number of bytes, the result
is undefined if the value was not originally written using a store of the
same type.</p>
<h5>Examples:</h5>
<pre>
%ptr = <a href="#i_alloca">alloca</a> i32 <i>; yields {i32*}:ptr</i>
<a href="#i_store">store</a> i32 3, i32* %ptr <i>; yields {void}</i>
%val = load i32* %ptr <i>; yields {i32}:val = i32 3</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"> <a name="i_store">'<tt>store</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
store &lt;ty&gt; &lt;value&gt;, &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;] <i>; yields {void}</i>
volatile store &lt;ty&gt; &lt;value&gt;, &lt;ty&gt;* &lt;pointer&gt;[, align &lt;alignment&gt;] <i>; yields {void}</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>store</tt>' instruction is used to write to memory.</p>
<h5>Arguments:</h5>
<p>There are two arguments to the '<tt>store</tt>' instruction: a value to store
and an address at which to store it. The type of the
'<tt>&lt;pointer&gt;</tt>' operand must be a pointer to
the <a href="#t_firstclass">first class</a> type of the
'<tt>&lt;value&gt;</tt>' operand. If the <tt>store</tt> is marked
as <tt>volatile</tt>, then the optimizer is not allowed to modify the number
or order of execution of this <tt>store</tt> with other
volatile <tt>load</tt> and <tt><a href="#i_store">store</a></tt>
instructions.</p>
<p>The optional constant "align" argument specifies the alignment of the
operation (that is, the alignment of the memory address). A value of 0 or an
omitted "align" argument means that the operation has the preferential
alignment for the target. It is the responsibility of the code emitter to
ensure that the alignment information is correct. Overestimating the
alignment results in an undefined behavior. Underestimating the alignment may
produce less efficient code. An alignment of 1 is always safe.</p>
<h5>Semantics:</h5>
<p>The contents of memory are updated to contain '<tt>&lt;value&gt;</tt>' at the
location specified by the '<tt>&lt;pointer&gt;</tt>' operand. If
'<tt>&lt;value&gt;</tt>' is of scalar type then the number of bytes written
does not exceed the minimum number of bytes needed to hold all bits of the
type. For example, storing an <tt>i24</tt> writes at most three bytes. When
writing a value of a type like <tt>i20</tt> with a size that is not an
integral number of bytes, it is unspecified what happens to the extra bits
that do not belong to the type, but they will typically be overwritten.</p>
<h5>Example:</h5>
<pre>
%ptr = <a href="#i_alloca">alloca</a> i32 <i>; yields {i32*}:ptr</i>
store i32 3, i32* %ptr <i>; yields {void}</i>
%val = <a href="#i_load">load</a> i32* %ptr <i>; yields {i32}:val = i32 3</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_getelementptr">'<tt>getelementptr</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = getelementptr &lt;pty&gt;* &lt;ptrval&gt;{, &lt;ty&gt; &lt;idx&gt;}*
&lt;result&gt; = getelementptr inbounds &lt;pty&gt;* &lt;ptrval&gt;{, &lt;ty&gt; &lt;idx&gt;}*
</pre>
<h5>Overview:</h5>
<p>The '<tt>getelementptr</tt>' instruction is used to get the address of a
subelement of an aggregate data structure. It performs address calculation
only and does not access memory.</p>
<h5>Arguments:</h5>
<p>The first argument is always a pointer, and forms the basis of the
calculation. The remaining arguments are indices that indicate which of the
elements of the aggregate object are indexed. The interpretation of each
index is dependent on the type being indexed into. The first index always
indexes the pointer value given as the first argument, the second index
indexes a value of the type pointed to (not necessarily the value directly
pointed to, since the first index can be non-zero), etc. The first type
indexed into must be a pointer value, subsequent types can be arrays, vectors
and structs. Note that subsequent types being indexed into can never be
pointers, since that would require loading the pointer before continuing
calculation.</p>
<p>The type of each index argument depends on the type it is indexing into.
When indexing into a (optionally packed) structure, only <tt>i32</tt> integer
<b>constants</b> are allowed. When indexing into an array, pointer or
vector, integers of any width are allowed, and they are not required to be
constant.</p>
<p>For example, let's consider a C code fragment and how it gets compiled to
LLVM:</p>
<div class="doc_code">
<pre>
struct RT {
char A;
int B[10][20];
char C;
};
struct ST {
int X;
double Y;
struct RT Z;
};
int *foo(struct ST *s) {
return &amp;s[1].Z.B[5][13];
}
</pre>
</div>
<p>The LLVM code generated by the GCC frontend is:</p>
<div class="doc_code">
<pre>
%RT = <a href="#namedtypes">type</a> { i8 , [10 x [20 x i32]], i8 }
%ST = <a href="#namedtypes">type</a> { i32, double, %RT }
define i32* @foo(%ST* %s) {
entry:
%reg = getelementptr %ST* %s, i32 1, i32 2, i32 1, i32 5, i32 13
ret i32* %reg
}
</pre>
</div>
<h5>Semantics:</h5>
<p>In the example above, the first index is indexing into the '<tt>%ST*</tt>'
type, which is a pointer, yielding a '<tt>%ST</tt>' = '<tt>{ i32, double, %RT
}</tt>' type, a structure. The second index indexes into the third element
of the structure, yielding a '<tt>%RT</tt>' = '<tt>{ i8 , [10 x [20 x i32]],
i8 }</tt>' type, another structure. The third index indexes into the second
element of the structure, yielding a '<tt>[10 x [20 x i32]]</tt>' type, an
array. The two dimensions of the array are subscripted into, yielding an
'<tt>i32</tt>' type. The '<tt>getelementptr</tt>' instruction returns a
pointer to this element, thus computing a value of '<tt>i32*</tt>' type.</p>
<p>Note that it is perfectly legal to index partially through a structure,
returning a pointer to an inner element. Because of this, the LLVM code for
the given testcase is equivalent to:</p>
<pre>
define i32* @foo(%ST* %s) {
%t1 = getelementptr %ST* %s, i32 1 <i>; yields %ST*:%t1</i>
%t2 = getelementptr %ST* %t1, i32 0, i32 2 <i>; yields %RT*:%t2</i>
%t3 = getelementptr %RT* %t2, i32 0, i32 1 <i>; yields [10 x [20 x i32]]*:%t3</i>
%t4 = getelementptr [10 x [20 x i32]]* %t3, i32 0, i32 5 <i>; yields [20 x i32]*:%t4</i>
%t5 = getelementptr [20 x i32]* %t4, i32 0, i32 13 <i>; yields i32*:%t5</i>
ret i32* %t5
}
</pre>
<p>If the <tt>inbounds</tt> keyword is present, the result value of the
<tt>getelementptr</tt> is undefined if the base pointer is not an
<i>in bounds</i> address of an allocated object, or if any of the addresses
that would be formed by successive addition of the offsets implied by the
indices to the base address with infinitely precise arithmetic are not an
<i>in bounds</i> address of that allocated object.
The <i>in bounds</i> addresses for an allocated object are all the addresses
that point into the object, plus the address one byte past the end.</p>
<p>If the <tt>inbounds</tt> keyword is not present, the offsets are added to
the base address with silently-wrapping two's complement arithmetic, and
the result value of the <tt>getelementptr</tt> may be outside the object
pointed to by the base pointer. The result value may not necessarily be
used to access memory though, even if it happens to point into allocated
storage. See the <a href="#pointeraliasing">Pointer Aliasing Rules</a>
section for more information.</p>
<p>The getelementptr instruction is often confusing. For some more insight into
how it works, see <a href="GetElementPtr.html">the getelementptr FAQ</a>.</p>
<h5>Example:</h5>
<pre>
<i>; yields [12 x i8]*:aptr</i>
%aptr = getelementptr {i32, [12 x i8]}* %saptr, i64 0, i32 1
<i>; yields i8*:vptr</i>
%vptr = getelementptr {i32, &lt;2 x i8&gt;}* %svptr, i64 0, i32 1, i32 1
<i>; yields i8*:eptr</i>
%eptr = getelementptr [12 x i8]* %aptr, i64 0, i32 1
<i>; yields i32*:iptr</i>
%iptr = getelementptr [10 x i32]* @arr, i16 0, i16 0
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="convertops">Conversion Operations</a>
</div>
<div class="doc_text">
<p>The instructions in this category are the conversion instructions (casting)
which all take a single operand and a type. They perform various bit
conversions on the operand.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_trunc">'<tt>trunc .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = trunc &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>trunc</tt>' instruction truncates its operand to the
type <tt>ty2</tt>.</p>
<h5>Arguments:</h5>
<p>The '<tt>trunc</tt>' instruction takes a <tt>value</tt> to trunc, which must
be an <a href="#t_integer">integer</a> type, and a type that specifies the
size and type of the result, which must be
an <a href="#t_integer">integer</a> type. The bit size of <tt>value</tt> must
be larger than the bit size of <tt>ty2</tt>. Equal sized types are not
allowed.</p>
<h5>Semantics:</h5>
<p>The '<tt>trunc</tt>' instruction truncates the high order bits
in <tt>value</tt> and converts the remaining bits to <tt>ty2</tt>. Since the
source size must be larger than the destination size, <tt>trunc</tt> cannot
be a <i>no-op cast</i>. It will always truncate bits.</p>
<h5>Example:</h5>
<pre>
%X = trunc i32 257 to i8 <i>; yields i8:1</i>
%Y = trunc i32 123 to i1 <i>; yields i1:true</i>
%Y = trunc i32 122 to i1 <i>; yields i1:false</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_zext">'<tt>zext .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = zext &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>zext</tt>' instruction zero extends its operand to type
<tt>ty2</tt>.</p>
<h5>Arguments:</h5>
<p>The '<tt>zext</tt>' instruction takes a value to cast, which must be of
<a href="#t_integer">integer</a> type, and a type to cast it to, which must
also be of <a href="#t_integer">integer</a> type. The bit size of the
<tt>value</tt> must be smaller than the bit size of the destination type,
<tt>ty2</tt>.</p>
<h5>Semantics:</h5>
<p>The <tt>zext</tt> fills the high order bits of the <tt>value</tt> with zero
bits until it reaches the size of the destination type, <tt>ty2</tt>.</p>
<p>When zero extending from i1, the result will always be either 0 or 1.</p>
<h5>Example:</h5>
<pre>
%X = zext i32 257 to i64 <i>; yields i64:257</i>
%Y = zext i1 true to i32 <i>; yields i32:1</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_sext">'<tt>sext .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = sext &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>sext</tt>' sign extends <tt>value</tt> to the type <tt>ty2</tt>.</p>
<h5>Arguments:</h5>
<p>The '<tt>sext</tt>' instruction takes a value to cast, which must be of
<a href="#t_integer">integer</a> type, and a type to cast it to, which must
also be of <a href="#t_integer">integer</a> type. The bit size of the
<tt>value</tt> must be smaller than the bit size of the destination type,
<tt>ty2</tt>.</p>
<h5>Semantics:</h5>
<p>The '<tt>sext</tt>' instruction performs a sign extension by copying the sign
bit (highest order bit) of the <tt>value</tt> until it reaches the bit size
of the type <tt>ty2</tt>.</p>
<p>When sign extending from i1, the extension always results in -1 or 0.</p>
<h5>Example:</h5>
<pre>
%X = sext i8 -1 to i16 <i>; yields i16 :65535</i>
%Y = sext i1 true to i32 <i>; yields i32:-1</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_fptrunc">'<tt>fptrunc .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fptrunc &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fptrunc</tt>' instruction truncates <tt>value</tt> to type
<tt>ty2</tt>.</p>
<h5>Arguments:</h5>
<p>The '<tt>fptrunc</tt>' instruction takes a <a href="#t_floating">floating
point</a> value to cast and a <a href="#t_floating">floating point</a> type
to cast it to. The size of <tt>value</tt> must be larger than the size of
<tt>ty2</tt>. This implies that <tt>fptrunc</tt> cannot be used to make a
<i>no-op cast</i>.</p>
<h5>Semantics:</h5>
<p>The '<tt>fptrunc</tt>' instruction truncates a <tt>value</tt> from a larger
<a href="#t_floating">floating point</a> type to a smaller
<a href="#t_floating">floating point</a> type. If the value cannot fit
within the destination type, <tt>ty2</tt>, then the results are
undefined.</p>
<h5>Example:</h5>
<pre>
%X = fptrunc double 123.0 to float <i>; yields float:123.0</i>
%Y = fptrunc double 1.0E+300 to float <i>; yields undefined</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_fpext">'<tt>fpext .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fpext &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fpext</tt>' extends a floating point <tt>value</tt> to a larger
floating point value.</p>
<h5>Arguments:</h5>
<p>The '<tt>fpext</tt>' instruction takes a
<a href="#t_floating">floating point</a> <tt>value</tt> to cast, and
a <a href="#t_floating">floating point</a> type to cast it to. The source
type must be smaller than the destination type.</p>
<h5>Semantics:</h5>
<p>The '<tt>fpext</tt>' instruction extends the <tt>value</tt> from a smaller
<a href="#t_floating">floating point</a> type to a larger
<a href="#t_floating">floating point</a> type. The <tt>fpext</tt> cannot be
used to make a <i>no-op cast</i> because it always changes bits. Use
<tt>bitcast</tt> to make a <i>no-op cast</i> for a floating point cast.</p>
<h5>Example:</h5>
<pre>
%X = fpext float 3.1415 to double <i>; yields double:3.1415</i>
%Y = fpext float 1.0 to float <i>; yields float:1.0 (no-op)</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_fptoui">'<tt>fptoui .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fptoui &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fptoui</tt>' converts a floating point <tt>value</tt> to its
unsigned integer equivalent of type <tt>ty2</tt>.</p>
<h5>Arguments:</h5>
<p>The '<tt>fptoui</tt>' instruction takes a value to cast, which must be a
scalar or vector <a href="#t_floating">floating point</a> value, and a type
to cast it to <tt>ty2</tt>, which must be an <a href="#t_integer">integer</a>
type. If <tt>ty</tt> is a vector floating point type, <tt>ty2</tt> must be a
vector integer type with the same number of elements as <tt>ty</tt></p>
<h5>Semantics:</h5>
<p>The '<tt>fptoui</tt>' instruction converts its
<a href="#t_floating">floating point</a> operand into the nearest (rounding
towards zero) unsigned integer value. If the value cannot fit
in <tt>ty2</tt>, the results are undefined.</p>
<h5>Example:</h5>
<pre>
%X = fptoui double 123.0 to i32 <i>; yields i32:123</i>
%Y = fptoui float 1.0E+300 to i1 <i>; yields undefined:1</i>
%X = fptoui float 1.04E+17 to i8 <i>; yields undefined:1</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_fptosi">'<tt>fptosi .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fptosi &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fptosi</tt>' instruction converts
<a href="#t_floating">floating point</a> <tt>value</tt> to
type <tt>ty2</tt>.</p>
<h5>Arguments:</h5>
<p>The '<tt>fptosi</tt>' instruction takes a value to cast, which must be a
scalar or vector <a href="#t_floating">floating point</a> value, and a type
to cast it to <tt>ty2</tt>, which must be an <a href="#t_integer">integer</a>
type. If <tt>ty</tt> is a vector floating point type, <tt>ty2</tt> must be a
vector integer type with the same number of elements as <tt>ty</tt></p>
<h5>Semantics:</h5>
<p>The '<tt>fptosi</tt>' instruction converts its
<a href="#t_floating">floating point</a> operand into the nearest (rounding
towards zero) signed integer value. If the value cannot fit in <tt>ty2</tt>,
the results are undefined.</p>
<h5>Example:</h5>
<pre>
%X = fptosi double -123.0 to i32 <i>; yields i32:-123</i>
%Y = fptosi float 1.0E-247 to i1 <i>; yields undefined:1</i>
%X = fptosi float 1.04E+17 to i8 <i>; yields undefined:1</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_uitofp">'<tt>uitofp .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = uitofp &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>uitofp</tt>' instruction regards <tt>value</tt> as an unsigned
integer and converts that value to the <tt>ty2</tt> type.</p>
<h5>Arguments:</h5>
<p>The '<tt>uitofp</tt>' instruction takes a value to cast, which must be a
scalar or vector <a href="#t_integer">integer</a> value, and a type to cast
it to <tt>ty2</tt>, which must be an <a href="#t_floating">floating point</a>
type. If <tt>ty</tt> is a vector integer type, <tt>ty2</tt> must be a vector
floating point type with the same number of elements as <tt>ty</tt></p>
<h5>Semantics:</h5>
<p>The '<tt>uitofp</tt>' instruction interprets its operand as an unsigned
integer quantity and converts it to the corresponding floating point
value. If the value cannot fit in the floating point value, the results are
undefined.</p>
<h5>Example:</h5>
<pre>
%X = uitofp i32 257 to float <i>; yields float:257.0</i>
%Y = uitofp i8 -1 to double <i>; yields double:255.0</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_sitofp">'<tt>sitofp .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = sitofp &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>sitofp</tt>' instruction regards <tt>value</tt> as a signed integer
and converts that value to the <tt>ty2</tt> type.</p>
<h5>Arguments:</h5>
<p>The '<tt>sitofp</tt>' instruction takes a value to cast, which must be a
scalar or vector <a href="#t_integer">integer</a> value, and a type to cast
it to <tt>ty2</tt>, which must be an <a href="#t_floating">floating point</a>
type. If <tt>ty</tt> is a vector integer type, <tt>ty2</tt> must be a vector
floating point type with the same number of elements as <tt>ty</tt></p>
<h5>Semantics:</h5>
<p>The '<tt>sitofp</tt>' instruction interprets its operand as a signed integer
quantity and converts it to the corresponding floating point value. If the
value cannot fit in the floating point value, the results are undefined.</p>
<h5>Example:</h5>
<pre>
%X = sitofp i32 257 to float <i>; yields float:257.0</i>
%Y = sitofp i8 -1 to double <i>; yields double:-1.0</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_ptrtoint">'<tt>ptrtoint .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = ptrtoint &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>ptrtoint</tt>' instruction converts the pointer <tt>value</tt> to
the integer type <tt>ty2</tt>.</p>
<h5>Arguments:</h5>
<p>The '<tt>ptrtoint</tt>' instruction takes a <tt>value</tt> to cast, which
must be a <a href="#t_pointer">pointer</a> value, and a type to cast it to
<tt>ty2</tt>, which must be an <a href="#t_integer">integer</a> type.</p>
<h5>Semantics:</h5>
<p>The '<tt>ptrtoint</tt>' instruction converts <tt>value</tt> to integer type
<tt>ty2</tt> by interpreting the pointer value as an integer and either
truncating or zero extending that value to the size of the integer type. If
<tt>value</tt> is smaller than <tt>ty2</tt> then a zero extension is done. If
<tt>value</tt> is larger than <tt>ty2</tt> then a truncation is done. If they
are the same size, then nothing is done (<i>no-op cast</i>) other than a type
change.</p>
<h5>Example:</h5>
<pre>
%X = ptrtoint i32* %X to i8 <i>; yields truncation on 32-bit architecture</i>
%Y = ptrtoint i32* %x to i64 <i>; yields zero extension on 32-bit architecture</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_inttoptr">'<tt>inttoptr .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = inttoptr &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>inttoptr</tt>' instruction converts an integer <tt>value</tt> to a
pointer type, <tt>ty2</tt>.</p>
<h5>Arguments:</h5>
<p>The '<tt>inttoptr</tt>' instruction takes an <a href="#t_integer">integer</a>
value to cast, and a type to cast it to, which must be a
<a href="#t_pointer">pointer</a> type.</p>
<h5>Semantics:</h5>
<p>The '<tt>inttoptr</tt>' instruction converts <tt>value</tt> to type
<tt>ty2</tt> by applying either a zero extension or a truncation depending on
the size of the integer <tt>value</tt>. If <tt>value</tt> is larger than the
size of a pointer then a truncation is done. If <tt>value</tt> is smaller
than the size of a pointer then a zero extension is done. If they are the
same size, nothing is done (<i>no-op cast</i>).</p>
<h5>Example:</h5>
<pre>
%X = inttoptr i32 255 to i32* <i>; yields zero extension on 64-bit architecture</i>
%X = inttoptr i32 255 to i32* <i>; yields no-op on 32-bit architecture</i>
%Y = inttoptr i64 0 to i32* <i>; yields truncation on 32-bit architecture</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_bitcast">'<tt>bitcast .. to</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = bitcast &lt;ty&gt; &lt;value&gt; to &lt;ty2&gt; <i>; yields ty2</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>bitcast</tt>' instruction converts <tt>value</tt> to type
<tt>ty2</tt> without changing any bits.</p>
<h5>Arguments:</h5>
<p>The '<tt>bitcast</tt>' instruction takes a value to cast, which must be a
non-aggregate first class value, and a type to cast it to, which must also be
a non-aggregate <a href="#t_firstclass">first class</a> type. The bit sizes
of <tt>value</tt> and the destination type, <tt>ty2</tt>, must be
identical. If the source type is a pointer, the destination type must also be
a pointer. This instruction supports bitwise conversion of vectors to
integers and to vectors of other types (as long as they have the same
size).</p>
<h5>Semantics:</h5>
<p>The '<tt>bitcast</tt>' instruction converts <tt>value</tt> to type
<tt>ty2</tt>. It is always a <i>no-op cast</i> because no bits change with
this conversion. The conversion is done as if the <tt>value</tt> had been
stored to memory and read back as type <tt>ty2</tt>. Pointer types may only
be converted to other pointer types with this instruction. To convert
pointers to other types, use the <a href="#i_inttoptr">inttoptr</a> or
<a href="#i_ptrtoint">ptrtoint</a> instructions first.</p>
<h5>Example:</h5>
<pre>
%X = bitcast i8 255 to i8 <i>; yields i8 :-1</i>
%Y = bitcast i32* %x to sint* <i>; yields sint*:%x</i>
%Z = bitcast &lt;2 x int&gt; %V to i64; <i>; yields i64: %V</i>
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection"> <a name="otherops">Other Operations</a> </div>
<div class="doc_text">
<p>The instructions in this category are the "miscellaneous" instructions, which
defy better classification.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"><a name="i_icmp">'<tt>icmp</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = icmp &lt;cond&gt; &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {i1} or {&lt;N x i1&gt;}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>icmp</tt>' instruction returns a boolean value or a vector of
boolean values based on comparison of its two integer, integer vector, or
pointer operands.</p>
<h5>Arguments:</h5>
<p>The '<tt>icmp</tt>' instruction takes three operands. The first operand is
the condition code indicating the kind of comparison to perform. It is not a
value, just a keyword. The possible condition code are:</p>
<ol>
<li><tt>eq</tt>: equal</li>
<li><tt>ne</tt>: not equal </li>
<li><tt>ugt</tt>: unsigned greater than</li>
<li><tt>uge</tt>: unsigned greater or equal</li>
<li><tt>ult</tt>: unsigned less than</li>
<li><tt>ule</tt>: unsigned less or equal</li>
<li><tt>sgt</tt>: signed greater than</li>
<li><tt>sge</tt>: signed greater or equal</li>
<li><tt>slt</tt>: signed less than</li>
<li><tt>sle</tt>: signed less or equal</li>
</ol>
<p>The remaining two arguments must be <a href="#t_integer">integer</a> or
<a href="#t_pointer">pointer</a> or integer <a href="#t_vector">vector</a>
typed. They must also be identical types.</p>
<h5>Semantics:</h5>
<p>The '<tt>icmp</tt>' compares <tt>op1</tt> and <tt>op2</tt> according to the
condition code given as <tt>cond</tt>. The comparison performed always yields
either an <a href="#t_integer"><tt>i1</tt></a> or vector of <tt>i1</tt>
result, as follows:</p>
<ol>
<li><tt>eq</tt>: yields <tt>true</tt> if the operands are equal,
<tt>false</tt> otherwise. No sign interpretation is necessary or
performed.</li>
<li><tt>ne</tt>: yields <tt>true</tt> if the operands are unequal,
<tt>false</tt> otherwise. No sign interpretation is necessary or
performed.</li>
<li><tt>ugt</tt>: interprets the operands as unsigned values and yields
<tt>true</tt> if <tt>op1</tt> is greater than <tt>op2</tt>.</li>
<li><tt>uge</tt>: interprets the operands as unsigned values and yields
<tt>true</tt> if <tt>op1</tt> is greater than or equal
to <tt>op2</tt>.</li>
<li><tt>ult</tt>: interprets the operands as unsigned values and yields
<tt>true</tt> if <tt>op1</tt> is less than <tt>op2</tt>.</li>
<li><tt>ule</tt>: interprets the operands as unsigned values and yields
<tt>true</tt> if <tt>op1</tt> is less than or equal to <tt>op2</tt>.</li>
<li><tt>sgt</tt>: interprets the operands as signed values and yields
<tt>true</tt> if <tt>op1</tt> is greater than <tt>op2</tt>.</li>
<li><tt>sge</tt>: interprets the operands as signed values and yields
<tt>true</tt> if <tt>op1</tt> is greater than or equal
to <tt>op2</tt>.</li>
<li><tt>slt</tt>: interprets the operands as signed values and yields
<tt>true</tt> if <tt>op1</tt> is less than <tt>op2</tt>.</li>
<li><tt>sle</tt>: interprets the operands as signed values and yields
<tt>true</tt> if <tt>op1</tt> is less than or equal to <tt>op2</tt>.</li>
</ol>
<p>If the operands are <a href="#t_pointer">pointer</a> typed, the pointer
values are compared as if they were integers.</p>
<p>If the operands are integer vectors, then they are compared element by
element. The result is an <tt>i1</tt> vector with the same number of elements
as the values being compared. Otherwise, the result is an <tt>i1</tt>.</p>
<h5>Example:</h5>
<pre>
&lt;result&gt; = icmp eq i32 4, 5 <i>; yields: result=false</i>
&lt;result&gt; = icmp ne float* %X, %X <i>; yields: result=false</i>
&lt;result&gt; = icmp ult i16 4, 5 <i>; yields: result=true</i>
&lt;result&gt; = icmp sgt i16 4, 5 <i>; yields: result=false</i>
&lt;result&gt; = icmp ule i16 -4, 5 <i>; yields: result=false</i>
&lt;result&gt; = icmp sge i16 4, 5 <i>; yields: result=false</i>
</pre>
<p>Note that the code generator does not yet support vector types with
the <tt>icmp</tt> instruction.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection"><a name="i_fcmp">'<tt>fcmp</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = fcmp &lt;cond&gt; &lt;ty&gt; &lt;op1&gt;, &lt;op2&gt; <i>; yields {i1} or {&lt;N x i1&gt;}:result</i>
</pre>
<h5>Overview:</h5>
<p>The '<tt>fcmp</tt>' instruction returns a boolean value or vector of boolean
values based on comparison of its operands.</p>
<p>If the operands are floating point scalars, then the result type is a boolean
(<a href="#t_integer"><tt>i1</tt></a>).</p>
<p>If the operands are floating point vectors, then the result type is a vector
of boolean with the same number of elements as the operands being
compared.</p>
<h5>Arguments:</h5>
<p>The '<tt>fcmp</tt>' instruction takes three operands. The first operand is
the condition code indicating the kind of comparison to perform. It is not a
value, just a keyword. The possible condition code are:</p>
<ol>
<li><tt>false</tt>: no comparison, always returns false</li>
<li><tt>oeq</tt>: ordered and equal</li>
<li><tt>ogt</tt>: ordered and greater than </li>
<li><tt>oge</tt>: ordered and greater than or equal</li>
<li><tt>olt</tt>: ordered and less than </li>
<li><tt>ole</tt>: ordered and less than or equal</li>
<li><tt>one</tt>: ordered and not equal</li>
<li><tt>ord</tt>: ordered (no nans)</li>
<li><tt>ueq</tt>: unordered or equal</li>
<li><tt>ugt</tt>: unordered or greater than </li>
<li><tt>uge</tt>: unordered or greater than or equal</li>
<li><tt>ult</tt>: unordered or less than </li>
<li><tt>ule</tt>: unordered or less than or equal</li>
<li><tt>une</tt>: unordered or not equal</li>
<li><tt>uno</tt>: unordered (either nans)</li>
<li><tt>true</tt>: no comparison, always returns true</li>
</ol>
<p><i>Ordered</i> means that neither operand is a QNAN while
<i>unordered</i> means that either operand may be a QNAN.</p>
<p>Each of <tt>val1</tt> and <tt>val2</tt> arguments must be either
a <a href="#t_floating">floating point</a> type or
a <a href="#t_vector">vector</a> of floating point type. They must have
identical types.</p>
<h5>Semantics:</h5>
<p>The '<tt>fcmp</tt>' instruction compares <tt>op1</tt> and <tt>op2</tt>
according to the condition code given as <tt>cond</tt>. If the operands are
vectors, then the vectors are compared element by element. Each comparison
performed always yields an <a href="#t_integer">i1</a> result, as
follows:</p>
<ol>
<li><tt>false</tt>: always yields <tt>false</tt>, regardless of operands.</li>
<li><tt>oeq</tt>: yields <tt>true</tt> if both operands are not a QNAN and
<tt>op1</tt> is equal to <tt>op2</tt>.</li>
<li><tt>ogt</tt>: yields <tt>true</tt> if both operands are not a QNAN and
<tt>op1</tt> is greather than <tt>op2</tt>.</li>
<li><tt>oge</tt>: yields <tt>true</tt> if both operands are not a QNAN and
<tt>op1</tt> is greater than or equal to <tt>op2</tt>.</li>
<li><tt>olt</tt>: yields <tt>true</tt> if both operands are not a QNAN and
<tt>op1</tt> is less than <tt>op2</tt>.</li>
<li><tt>ole</tt>: yields <tt>true</tt> if both operands are not a QNAN and
<tt>op1</tt> is less than or equal to <tt>op2</tt>.</li>
<li><tt>one</tt>: yields <tt>true</tt> if both operands are not a QNAN and
<tt>op1</tt> is not equal to <tt>op2</tt>.</li>
<li><tt>ord</tt>: yields <tt>true</tt> if both operands are not a QNAN.</li>
<li><tt>ueq</tt>: yields <tt>true</tt> if either operand is a QNAN or
<tt>op1</tt> is equal to <tt>op2</tt>.</li>
<li><tt>ugt</tt>: yields <tt>true</tt> if either operand is a QNAN or
<tt>op1</tt> is greater than <tt>op2</tt>.</li>
<li><tt>uge</tt>: yields <tt>true</tt> if either operand is a QNAN or
<tt>op1</tt> is greater than or equal to <tt>op2</tt>.</li>
<li><tt>ult</tt>: yields <tt>true</tt> if either operand is a QNAN or
<tt>op1</tt> is less than <tt>op2</tt>.</li>
<li><tt>ule</tt>: yields <tt>true</tt> if either operand is a QNAN or
<tt>op1</tt> is less than or equal to <tt>op2</tt>.</li>
<li><tt>une</tt>: yields <tt>true</tt> if either operand is a QNAN or
<tt>op1</tt> is not equal to <tt>op2</tt>.</li>
<li><tt>uno</tt>: yields <tt>true</tt> if either operand is a QNAN.</li>
<li><tt>true</tt>: always yields <tt>true</tt>, regardless of operands.</li>
</ol>
<h5>Example:</h5>
<pre>
&lt;result&gt; = fcmp oeq float 4.0, 5.0 <i>; yields: result=false</i>
&lt;result&gt; = fcmp one float 4.0, 5.0 <i>; yields: result=true</i>
&lt;result&gt; = fcmp olt float 4.0, 5.0 <i>; yields: result=true</i>
&lt;result&gt; = fcmp ueq double 1.0, 2.0 <i>; yields: result=false</i>
</pre>
<p>Note that the code generator does not yet support vector types with
the <tt>fcmp</tt> instruction.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_phi">'<tt>phi</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = phi &lt;ty&gt; [ &lt;val0&gt;, &lt;label0&gt;], ...
</pre>
<h5>Overview:</h5>
<p>The '<tt>phi</tt>' instruction is used to implement the &#966; node in the
SSA graph representing the function.</p>
<h5>Arguments:</h5>
<p>The type of the incoming values is specified with the first type field. After
this, the '<tt>phi</tt>' instruction takes a list of pairs as arguments, with
one pair for each predecessor basic block of the current block. Only values
of <a href="#t_firstclass">first class</a> type may be used as the value
arguments to the PHI node. Only labels may be used as the label
arguments.</p>
<p>There must be no non-phi instructions between the start of a basic block and
the PHI instructions: i.e. PHI instructions must be first in a basic
block.</p>
<p>For the purposes of the SSA form, the use of each incoming value is deemed to
occur on the edge from the corresponding predecessor block to the current
block (but after any definition of an '<tt>invoke</tt>' instruction's return
value on the same edge).</p>
<h5>Semantics:</h5>
<p>At runtime, the '<tt>phi</tt>' instruction logically takes on the value
specified by the pair corresponding to the predecessor basic block that
executed just prior to the current block.</p>
<h5>Example:</h5>
<pre>
Loop: ; Infinite loop that counts from 0 on up...
%indvar = phi i32 [ 0, %LoopHeader ], [ %nextindvar, %Loop ]
%nextindvar = add i32 %indvar, 1
br label %Loop
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_select">'<tt>select</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = select <i>selty</i> &lt;cond&gt;, &lt;ty&gt; &lt;val1&gt;, &lt;ty&gt; &lt;val2&gt; <i>; yields ty</i>
<i>selty</i> is either i1 or {&lt;N x i1&gt;}
</pre>
<h5>Overview:</h5>
<p>The '<tt>select</tt>' instruction is used to choose one value based on a
condition, without branching.</p>
<h5>Arguments:</h5>
<p>The '<tt>select</tt>' instruction requires an 'i1' value or a vector of 'i1'
values indicating the condition, and two values of the
same <a href="#t_firstclass">first class</a> type. If the val1/val2 are
vectors and the condition is a scalar, then entire vectors are selected, not
individual elements.</p>
<h5>Semantics:</h5>
<p>If the condition is an i1 and it evaluates to 1, the instruction returns the
first value argument; otherwise, it returns the second value argument.</p>
<p>If the condition is a vector of i1, then the value arguments must be vectors
of the same size, and the selection is done element by element.</p>
<h5>Example:</h5>
<pre>
%X = select i1 true, i8 17, i8 42 <i>; yields i8:17</i>
</pre>
<p>Note that the code generator does not yet support conditions
with vector type.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_call">'<tt>call</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;result&gt; = [tail] call [<a href="#callingconv">cconv</a>] [<a href="#paramattrs">ret attrs</a>] &lt;ty&gt; [&lt;fnty&gt;*] &lt;fnptrval&gt;(&lt;function args&gt;) [<a href="#fnattrs">fn attrs</a>]
</pre>
<h5>Overview:</h5>
<p>The '<tt>call</tt>' instruction represents a simple function call.</p>
<h5>Arguments:</h5>
<p>This instruction requires several arguments:</p>
<ol>
<li>The optional "tail" marker indicates whether the callee function accesses
any allocas or varargs in the caller. If the "tail" marker is present,
the function call is eligible for tail call optimization. Note that calls
may be marked "tail" even if they do not occur before
a <a href="#i_ret"><tt>ret</tt></a> instruction.</li>
<li>The optional "cconv" marker indicates which <a href="#callingconv">calling
convention</a> the call should use. If none is specified, the call
defaults to using C calling conventions.</li>
<li>The optional <a href="#paramattrs">Parameter Attributes</a> list for
return values. Only '<tt>zeroext</tt>', '<tt>signext</tt>', and
'<tt>inreg</tt>' attributes are valid here.</li>
<li>'<tt>ty</tt>': the type of the call instruction itself which is also the
type of the return value. Functions that return no value are marked
<tt><a href="#t_void">void</a></tt>.</li>
<li>'<tt>fnty</tt>': shall be the signature of the pointer to function value
being invoked. The argument types must match the types implied by this
signature. This type can be omitted if the function is not varargs and if
the function type does not return a pointer to a function.</li>
<li>'<tt>fnptrval</tt>': An LLVM value containing a pointer to a function to
be invoked. In most cases, this is a direct function invocation, but
indirect <tt>call</tt>s are just as possible, calling an arbitrary pointer
to function value.</li>
<li>'<tt>function args</tt>': argument list whose types match the function
signature argument types. All arguments must be of
<a href="#t_firstclass">first class</a> type. If the function signature
indicates the function accepts a variable number of arguments, the extra
arguments can be specified.</li>
<li>The optional <a href="#fnattrs">function attributes</a> list. Only
'<tt>noreturn</tt>', '<tt>nounwind</tt>', '<tt>readonly</tt>' and
'<tt>readnone</tt>' attributes are valid here.</li>
</ol>
<h5>Semantics:</h5>
<p>The '<tt>call</tt>' instruction is used to cause control flow to transfer to
a specified function, with its incoming arguments bound to the specified
values. Upon a '<tt><a href="#i_ret">ret</a></tt>' instruction in the called
function, control flow continues with the instruction after the function
call, and the return value of the function is bound to the result
argument.</p>
<h5>Example:</h5>
<pre>
%retval = call i32 @test(i32 %argc)
call i32 (i8 *, ...)* @printf(i8 * %msg, i32 12, i8 42) <i>; yields i32</i>
%X = tail call i32 @foo() <i>; yields i32</i>
%Y = tail call <a href="#callingconv">fastcc</a> i32 @foo() <i>; yields i32</i>
call void %foo(i8 97 signext)
%struct.A = type { i32, i8 }
%r = call %struct.A @foo() <i>; yields { 32, i8 }</i>
%gr = extractvalue %struct.A %r, 0 <i>; yields i32</i>
%gr1 = extractvalue %struct.A %r, 1 <i>; yields i8</i>
%Z = call void @foo() noreturn <i>; indicates that %foo never returns normally</i>
%ZZ = call zeroext i32 @bar() <i>; Return value is %zero extended</i>
</pre>
<p>llvm treats calls to some functions with names and arguments that match the
standard C99 library as being the C99 library functions, and may perform
optimizations or generate code for them under that assumption. This is
something we'd like to change in the future to provide better support for
freestanding environments and non-C-based langauges.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="i_va_arg">'<tt>va_arg</tt>' Instruction</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
&lt;resultval&gt; = va_arg &lt;va_list*&gt; &lt;arglist&gt;, &lt;argty&gt;
</pre>
<h5>Overview:</h5>
<p>The '<tt>va_arg</tt>' instruction is used to access arguments passed through
the "variable argument" area of a function call. It is used to implement the
<tt>va_arg</tt> macro in C.</p>
<h5>Arguments:</h5>
<p>This instruction takes a <tt>va_list*</tt> value and the type of the
argument. It returns a value of the specified argument type and increments
the <tt>va_list</tt> to point to the next argument. The actual type
of <tt>va_list</tt> is target specific.</p>
<h5>Semantics:</h5>
<p>The '<tt>va_arg</tt>' instruction loads an argument of the specified type
from the specified <tt>va_list</tt> and causes the <tt>va_list</tt> to point
to the next argument. For more information, see the variable argument
handling <a href="#int_varargs">Intrinsic Functions</a>.</p>
<p>It is legal for this instruction to be called in a function which does not
take a variable number of arguments, for example, the <tt>vfprintf</tt>
function.</p>
<p><tt>va_arg</tt> is an LLVM instruction instead of
an <a href="#intrinsics">intrinsic function</a> because it takes a type as an
argument.</p>
<h5>Example:</h5>
<p>See the <a href="#int_varargs">variable argument processing</a> section.</p>
<p>Note that the code generator does not yet fully support va_arg on many
targets. Also, it does not currently support va_arg with aggregate types on
any target.</p>
</div>
<!-- *********************************************************************** -->
<div class="doc_section"> <a name="intrinsics">Intrinsic Functions</a> </div>
<!-- *********************************************************************** -->
<div class="doc_text">
<p>LLVM supports the notion of an "intrinsic function". These functions have
well known names and semantics and are required to follow certain
restrictions. Overall, these intrinsics represent an extension mechanism for
the LLVM language that does not require changing all of the transformations
in LLVM when adding to the language (or the bitcode reader/writer, the
parser, etc...).</p>
<p>Intrinsic function names must all start with an "<tt>llvm.</tt>" prefix. This
prefix is reserved in LLVM for intrinsic names; thus, function names may not
begin with this prefix. Intrinsic functions must always be external
functions: you cannot define the body of intrinsic functions. Intrinsic
functions may only be used in call or invoke instructions: it is illegal to
take the address of an intrinsic function. Additionally, because intrinsic
functions are part of the LLVM language, it is required if any are added that
they be documented here.</p>
<p>Some intrinsic functions can be overloaded, i.e., the intrinsic represents a
family of functions that perform the same operation but on different data
types. Because LLVM can represent over 8 million different integer types,
overloading is used commonly to allow an intrinsic function to operate on any
integer type. One or more of the argument types or the result type can be
overloaded to accept any integer type. Argument types may also be defined as
exactly matching a previous argument's type or the result type. This allows
an intrinsic function which accepts multiple arguments, but needs all of them
to be of the same type, to only be overloaded with respect to a single
argument or the result.</p>
<p>Overloaded intrinsics will have the names of its overloaded argument types
encoded into its function name, each preceded by a period. Only those types
which are overloaded result in a name suffix. Arguments whose type is matched
against another type do not. For example, the <tt>llvm.ctpop</tt> function
can take an integer of any width and returns an integer of exactly the same
integer width. This leads to a family of functions such as
<tt>i8 @llvm.ctpop.i8(i8 %val)</tt> and <tt>i29 @llvm.ctpop.i29(i29
%val)</tt>. Only one type, the return type, is overloaded, and only one type
suffix is required. Because the argument's type is matched against the return
type, it does not require its own name suffix.</p>
<p>To learn how to add an intrinsic function, please see the
<a href="ExtendingLLVM.html">Extending LLVM Guide</a>.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_varargs">Variable Argument Handling Intrinsics</a>
</div>
<div class="doc_text">
<p>Variable argument support is defined in LLVM with
the <a href="#i_va_arg"><tt>va_arg</tt></a> instruction and these three
intrinsic functions. These functions are related to the similarly named
macros defined in the <tt>&lt;stdarg.h&gt;</tt> header file.</p>
<p>All of these functions operate on arguments that use a target-specific value
type "<tt>va_list</tt>". The LLVM assembly language reference manual does
not define what this type is, so all transformations should be prepared to
handle these functions regardless of the type used.</p>
<p>This example shows how the <a href="#i_va_arg"><tt>va_arg</tt></a>
instruction and the variable argument handling intrinsic functions are
used.</p>
<div class="doc_code">
<pre>
define i32 @test(i32 %X, ...) {
; Initialize variable argument processing
%ap = alloca i8*
%ap2 = bitcast i8** %ap to i8*
call void @llvm.va_start(i8* %ap2)
; Read a single integer argument
%tmp = va_arg i8** %ap, i32
; Demonstrate usage of llvm.va_copy and llvm.va_end
%aq = alloca i8*
%aq2 = bitcast i8** %aq to i8*
call void @llvm.va_copy(i8* %aq2, i8* %ap2)
call void @llvm.va_end(i8* %aq2)
; Stop processing of arguments.
call void @llvm.va_end(i8* %ap2)
ret i32 %tmp
}
declare void @llvm.va_start(i8*)
declare void @llvm.va_copy(i8*, i8*)
declare void @llvm.va_end(i8*)
</pre>
</div>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_va_start">'<tt>llvm.va_start</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void %llvm.va_start(i8* &lt;arglist&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.va_start</tt>' intrinsic initializes <tt>*&lt;arglist&gt;</tt>
for subsequent use by <tt><a href="#i_va_arg">va_arg</a></tt>.</p>
<h5>Arguments:</h5>
<p>The argument is a pointer to a <tt>va_list</tt> element to initialize.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.va_start</tt>' intrinsic works just like the <tt>va_start</tt>
macro available in C. In a target-dependent way, it initializes
the <tt>va_list</tt> element to which the argument points, so that the next
call to <tt>va_arg</tt> will produce the first variable argument passed to
the function. Unlike the C <tt>va_start</tt> macro, this intrinsic does not
need to know the last argument of the function as the compiler can figure
that out.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_va_end">'<tt>llvm.va_end</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.va_end(i8* &lt;arglist&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.va_end</tt>' intrinsic destroys <tt>*&lt;arglist&gt;</tt>,
which has been initialized previously
with <tt><a href="#int_va_start">llvm.va_start</a></tt>
or <tt><a href="#i_va_copy">llvm.va_copy</a></tt>.</p>
<h5>Arguments:</h5>
<p>The argument is a pointer to a <tt>va_list</tt> to destroy.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.va_end</tt>' intrinsic works just like the <tt>va_end</tt>
macro available in C. In a target-dependent way, it destroys
the <tt>va_list</tt> element to which the argument points. Calls
to <a href="#int_va_start"><tt>llvm.va_start</tt></a>
and <a href="#int_va_copy"> <tt>llvm.va_copy</tt></a> must be matched exactly
with calls to <tt>llvm.va_end</tt>.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_va_copy">'<tt>llvm.va_copy</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.va_copy(i8* &lt;destarglist&gt;, i8* &lt;srcarglist&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.va_copy</tt>' intrinsic copies the current argument position
from the source argument list to the destination argument list.</p>
<h5>Arguments:</h5>
<p>The first argument is a pointer to a <tt>va_list</tt> element to initialize.
The second argument is a pointer to a <tt>va_list</tt> element to copy
from.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.va_copy</tt>' intrinsic works just like the <tt>va_copy</tt>
macro available in C. In a target-dependent way, it copies the
source <tt>va_list</tt> element into the destination <tt>va_list</tt>
element. This intrinsic is necessary because
the <tt><a href="#int_va_start"> llvm.va_start</a></tt> intrinsic may be
arbitrarily complex and require, for example, memory allocation.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_gc">Accurate Garbage Collection Intrinsics</a>
</div>
<div class="doc_text">
<p>LLVM support for <a href="GarbageCollection.html">Accurate Garbage
Collection</a> (GC) requires the implementation and generation of these
intrinsics. These intrinsics allow identification of <a href="#int_gcroot">GC
roots on the stack</a>, as well as garbage collector implementations that
require <a href="#int_gcread">read</a> and <a href="#int_gcwrite">write</a>
barriers. Front-ends for type-safe garbage collected languages should generate
these intrinsics to make use of the LLVM garbage collectors. For more details,
see <a href="GarbageCollection.html">Accurate Garbage Collection with
LLVM</a>.</p>
<p>The garbage collection intrinsics only operate on objects in the generic
address space (address space zero).</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_gcroot">'<tt>llvm.gcroot</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.gcroot(i8** %ptrloc, i8* %metadata)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.gcroot</tt>' intrinsic declares the existence of a GC root to
the code generator, and allows some metadata to be associated with it.</p>
<h5>Arguments:</h5>
<p>The first argument specifies the address of a stack object that contains the
root pointer. The second pointer (which must be either a constant or a
global value address) contains the meta-data to be associated with the
root.</p>
<h5>Semantics:</h5>
<p>At runtime, a call to this intrinsic stores a null pointer into the "ptrloc"
location. At compile-time, the code generator generates information to allow
the runtime to find the pointer at GC safe points. The '<tt>llvm.gcroot</tt>'
intrinsic may only be used in a function which <a href="#gc">specifies a GC
algorithm</a>.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_gcread">'<tt>llvm.gcread</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare i8* @llvm.gcread(i8* %ObjPtr, i8** %Ptr)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.gcread</tt>' intrinsic identifies reads of references from heap
locations, allowing garbage collector implementations that require read
barriers.</p>
<h5>Arguments:</h5>
<p>The second argument is the address to read from, which should be an address
allocated from the garbage collector. The first object is a pointer to the
start of the referenced object, if needed by the language runtime (otherwise
null).</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.gcread</tt>' intrinsic has the same semantics as a load
instruction, but may be replaced with substantially more complex code by the
garbage collector runtime, as needed. The '<tt>llvm.gcread</tt>' intrinsic
may only be used in a function which <a href="#gc">specifies a GC
algorithm</a>.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_gcwrite">'<tt>llvm.gcwrite</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.gcwrite(i8* %P1, i8* %Obj, i8** %P2)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.gcwrite</tt>' intrinsic identifies writes of references to heap
locations, allowing garbage collector implementations that require write
barriers (such as generational or reference counting collectors).</p>
<h5>Arguments:</h5>
<p>The first argument is the reference to store, the second is the start of the
object to store it to, and the third is the address of the field of Obj to
store to. If the runtime does not require a pointer to the object, Obj may
be null.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.gcwrite</tt>' intrinsic has the same semantics as a store
instruction, but may be replaced with substantially more complex code by the
garbage collector runtime, as needed. The '<tt>llvm.gcwrite</tt>' intrinsic
may only be used in a function which <a href="#gc">specifies a GC
algorithm</a>.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_codegen">Code Generator Intrinsics</a>
</div>
<div class="doc_text">
<p>These intrinsics are provided by LLVM to expose special features that may
only be implemented with code generator support.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_returnaddress">'<tt>llvm.returnaddress</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare i8 *@llvm.returnaddress(i32 &lt;level&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.returnaddress</tt>' intrinsic attempts to compute a
target-specific value indicating the return address of the current function
or one of its callers.</p>
<h5>Arguments:</h5>
<p>The argument to this intrinsic indicates which function to return the address
for. Zero indicates the calling function, one indicates its caller, etc.
The argument is <b>required</b> to be a constant integer value.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.returnaddress</tt>' intrinsic either returns a pointer
indicating the return address of the specified call frame, or zero if it
cannot be identified. The value returned by this intrinsic is likely to be
incorrect or 0 for arguments other than zero, so it should only be used for
debugging purposes.</p>
<p>Note that calling this intrinsic does not prevent function inlining or other
aggressive transformations, so the value returned may not be that of the
obvious source-language caller.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_frameaddress">'<tt>llvm.frameaddress</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare i8 *@llvm.frameaddress(i32 &lt;level&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.frameaddress</tt>' intrinsic attempts to return the
target-specific frame pointer value for the specified stack frame.</p>
<h5>Arguments:</h5>
<p>The argument to this intrinsic indicates which function to return the frame
pointer for. Zero indicates the calling function, one indicates its caller,
etc. The argument is <b>required</b> to be a constant integer value.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.frameaddress</tt>' intrinsic either returns a pointer
indicating the frame address of the specified call frame, or zero if it
cannot be identified. The value returned by this intrinsic is likely to be
incorrect or 0 for arguments other than zero, so it should only be used for
debugging purposes.</p>
<p>Note that calling this intrinsic does not prevent function inlining or other
aggressive transformations, so the value returned may not be that of the
obvious source-language caller.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_stacksave">'<tt>llvm.stacksave</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare i8 *@llvm.stacksave()
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.stacksave</tt>' intrinsic is used to remember the current state
of the function stack, for use
with <a href="#int_stackrestore"> <tt>llvm.stackrestore</tt></a>. This is
useful for implementing language features like scoped automatic variable
sized arrays in C99.</p>
<h5>Semantics:</h5>
<p>This intrinsic returns a opaque pointer value that can be passed
to <a href="#int_stackrestore"><tt>llvm.stackrestore</tt></a>. When
an <tt>llvm.stackrestore</tt> intrinsic is executed with a value saved
from <tt>llvm.stacksave</tt>, it effectively restores the state of the stack
to the state it was in when the <tt>llvm.stacksave</tt> intrinsic executed.
In practice, this pops any <a href="#i_alloca">alloca</a> blocks from the
stack that were allocated after the <tt>llvm.stacksave</tt> was executed.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_stackrestore">'<tt>llvm.stackrestore</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.stackrestore(i8 * %ptr)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.stackrestore</tt>' intrinsic is used to restore the state of
the function stack to the state it was in when the
corresponding <a href="#int_stacksave"><tt>llvm.stacksave</tt></a> intrinsic
executed. This is useful for implementing language features like scoped
automatic variable sized arrays in C99.</p>
<h5>Semantics:</h5>
<p>See the description
for <a href="#int_stacksave"><tt>llvm.stacksave</tt></a>.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_prefetch">'<tt>llvm.prefetch</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.prefetch(i8* &lt;address&gt;, i32 &lt;rw&gt;, i32 &lt;locality&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.prefetch</tt>' intrinsic is a hint to the code generator to
insert a prefetch instruction if supported; otherwise, it is a noop.
Prefetches have no effect on the behavior of the program but can change its
performance characteristics.</p>
<h5>Arguments:</h5>
<p><tt>address</tt> is the address to be prefetched, <tt>rw</tt> is the
specifier determining if the fetch should be for a read (0) or write (1),
and <tt>locality</tt> is a temporal locality specifier ranging from (0) - no
locality, to (3) - extremely local keep in cache. The <tt>rw</tt>
and <tt>locality</tt> arguments must be constant integers.</p>
<h5>Semantics:</h5>
<p>This intrinsic does not modify the behavior of the program. In particular,
prefetches cannot trap and do not produce a value. On targets that support
this intrinsic, the prefetch can provide hints to the processor cache for
better performance.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_pcmarker">'<tt>llvm.pcmarker</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.pcmarker(i32 &lt;id&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.pcmarker</tt>' intrinsic is a method to export a Program
Counter (PC) in a region of code to simulators and other tools. The method
is target specific, but it is expected that the marker will use exported
symbols to transmit the PC of the marker. The marker makes no guarantees
that it will remain with any specific instruction after optimizations. It is
possible that the presence of a marker will inhibit optimizations. The
intended use is to be inserted after optimizations to allow correlations of
simulation runs.</p>
<h5>Arguments:</h5>
<p><tt>id</tt> is a numerical id identifying the marker.</p>
<h5>Semantics:</h5>
<p>This intrinsic does not modify the behavior of the program. Backends that do
not support this intrinisic may ignore it.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_readcyclecounter">'<tt>llvm.readcyclecounter</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare i64 @llvm.readcyclecounter( )
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.readcyclecounter</tt>' intrinsic provides access to the cycle
counter register (or similar low latency, high accuracy clocks) on those
targets that support it. On X86, it should map to RDTSC. On Alpha, it
should map to RPCC. As the backing counters overflow quickly (on the order
of 9 seconds on alpha), this should only be used for small timings.</p>
<h5>Semantics:</h5>
<p>When directly supported, reading the cycle counter should not modify any
memory. Implementations are allowed to either return a application specific
value or a system wide value. On backends without support, this is lowered
to a constant 0.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_libc">Standard C Library Intrinsics</a>
</div>
<div class="doc_text">
<p>LLVM provides intrinsics for a few important standard C library functions.
These intrinsics allow source-language front-ends to pass information about
the alignment of the pointer arguments to the code generator, providing
opportunity for more efficient code generation.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_memcpy">'<tt>llvm.memcpy</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.memcpy</tt> on any
integer bit width. Not all targets support all bit widths however.</p>
<pre>
declare void @llvm.memcpy.i8(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
i8 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memcpy.i16(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
i16 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memcpy.i32(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
i32 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memcpy.i64(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
i64 &lt;len&gt;, i32 &lt;align&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.memcpy.*</tt>' intrinsics copy a block of memory from the
source location to the destination location.</p>
<p>Note that, unlike the standard libc function, the <tt>llvm.memcpy.*</tt>
intrinsics do not return a value, and takes an extra alignment argument.</p>
<h5>Arguments:</h5>
<p>The first argument is a pointer to the destination, the second is a pointer
to the source. The third argument is an integer argument specifying the
number of bytes to copy, and the fourth argument is the alignment of the
source and destination locations.</p>
<p>If the call to this intrinisic has an alignment value that is not 0 or 1,
then the caller guarantees that both the source and destination pointers are
aligned to that boundary.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.memcpy.*</tt>' intrinsics copy a block of memory from the
source location to the destination location, which are not allowed to
overlap. It copies "len" bytes of memory over. If the argument is known to
be aligned to some boundary, this can be specified as the fourth argument,
otherwise it should be set to 0 or 1.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_memmove">'<tt>llvm.memmove</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use llvm.memmove on any integer bit
width. Not all targets support all bit widths however.</p>
<pre>
declare void @llvm.memmove.i8(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
i8 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memmove.i16(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
i16 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memmove.i32(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
i32 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memmove.i64(i8 * &lt;dest&gt;, i8 * &lt;src&gt;,
i64 &lt;len&gt;, i32 &lt;align&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.memmove.*</tt>' intrinsics move a block of memory from the
source location to the destination location. It is similar to the
'<tt>llvm.memcpy</tt>' intrinsic but allows the two memory locations to
overlap.</p>
<p>Note that, unlike the standard libc function, the <tt>llvm.memmove.*</tt>
intrinsics do not return a value, and takes an extra alignment argument.</p>
<h5>Arguments:</h5>
<p>The first argument is a pointer to the destination, the second is a pointer
to the source. The third argument is an integer argument specifying the
number of bytes to copy, and the fourth argument is the alignment of the
source and destination locations.</p>
<p>If the call to this intrinisic has an alignment value that is not 0 or 1,
then the caller guarantees that the source and destination pointers are
aligned to that boundary.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.memmove.*</tt>' intrinsics copy a block of memory from the
source location to the destination location, which may overlap. It copies
"len" bytes of memory over. If the argument is known to be aligned to some
boundary, this can be specified as the fourth argument, otherwise it should
be set to 0 or 1.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_memset">'<tt>llvm.memset.*</tt>' Intrinsics</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use llvm.memset on any integer bit
width. Not all targets support all bit widths however.</p>
<pre>
declare void @llvm.memset.i8(i8 * &lt;dest&gt;, i8 &lt;val&gt;,
i8 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memset.i16(i8 * &lt;dest&gt;, i8 &lt;val&gt;,
i16 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memset.i32(i8 * &lt;dest&gt;, i8 &lt;val&gt;,
i32 &lt;len&gt;, i32 &lt;align&gt;)
declare void @llvm.memset.i64(i8 * &lt;dest&gt;, i8 &lt;val&gt;,
i64 &lt;len&gt;, i32 &lt;align&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.memset.*</tt>' intrinsics fill a block of memory with a
particular byte value.</p>
<p>Note that, unlike the standard libc function, the <tt>llvm.memset</tt>
intrinsic does not return a value, and takes an extra alignment argument.</p>
<h5>Arguments:</h5>
<p>The first argument is a pointer to the destination to fill, the second is the
byte value to fill it with, the third argument is an integer argument
specifying the number of bytes to fill, and the fourth argument is the known
alignment of destination location.</p>
<p>If the call to this intrinisic has an alignment value that is not 0 or 1,
then the caller guarantees that the destination pointer is aligned to that
boundary.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.memset.*</tt>' intrinsics fill "len" bytes of memory starting
at the destination location. If the argument is known to be aligned to some
boundary, this can be specified as the fourth argument, otherwise it should
be set to 0 or 1.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_sqrt">'<tt>llvm.sqrt.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.sqrt</tt> on any
floating point or vector of floating point type. Not all targets support all
types however.</p>
<pre>
declare float @llvm.sqrt.f32(float %Val)
declare double @llvm.sqrt.f64(double %Val)
declare x86_fp80 @llvm.sqrt.f80(x86_fp80 %Val)
declare fp128 @llvm.sqrt.f128(fp128 %Val)
declare ppc_fp128 @llvm.sqrt.ppcf128(ppc_fp128 %Val)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.sqrt</tt>' intrinsics return the sqrt of the specified operand,
returning the same value as the libm '<tt>sqrt</tt>' functions would.
Unlike <tt>sqrt</tt> in libm, however, <tt>llvm.sqrt</tt> has undefined
behavior for negative numbers other than -0.0 (which allows for better
optimization, because there is no need to worry about errno being
set). <tt>llvm.sqrt(-0.0)</tt> is defined to return -0.0 like IEEE sqrt.</p>
<h5>Arguments:</h5>
<p>The argument and return value are floating point numbers of the same
type.</p>
<h5>Semantics:</h5>
<p>This function returns the sqrt of the specified operand if it is a
nonnegative floating point number.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_powi">'<tt>llvm.powi.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.powi</tt> on any
floating point or vector of floating point type. Not all targets support all
types however.</p>
<pre>
declare float @llvm.powi.f32(float %Val, i32 %power)
declare double @llvm.powi.f64(double %Val, i32 %power)
declare x86_fp80 @llvm.powi.f80(x86_fp80 %Val, i32 %power)
declare fp128 @llvm.powi.f128(fp128 %Val, i32 %power)
declare ppc_fp128 @llvm.powi.ppcf128(ppc_fp128 %Val, i32 %power)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.powi.*</tt>' intrinsics return the first operand raised to the
specified (positive or negative) power. The order of evaluation of
multiplications is not defined. When a vector of floating point type is
used, the second argument remains a scalar integer value.</p>
<h5>Arguments:</h5>
<p>The second argument is an integer power, and the first is a value to raise to
that power.</p>
<h5>Semantics:</h5>
<p>This function returns the first value raised to the second power with an
unspecified sequence of rounding operations.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_sin">'<tt>llvm.sin.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.sin</tt> on any
floating point or vector of floating point type. Not all targets support all
types however.</p>
<pre>
declare float @llvm.sin.f32(float %Val)
declare double @llvm.sin.f64(double %Val)
declare x86_fp80 @llvm.sin.f80(x86_fp80 %Val)
declare fp128 @llvm.sin.f128(fp128 %Val)
declare ppc_fp128 @llvm.sin.ppcf128(ppc_fp128 %Val)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.sin.*</tt>' intrinsics return the sine of the operand.</p>
<h5>Arguments:</h5>
<p>The argument and return value are floating point numbers of the same
type.</p>
<h5>Semantics:</h5>
<p>This function returns the sine of the specified operand, returning the same
values as the libm <tt>sin</tt> functions would, and handles error conditions
in the same way.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_cos">'<tt>llvm.cos.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.cos</tt> on any
floating point or vector of floating point type. Not all targets support all
types however.</p>
<pre>
declare float @llvm.cos.f32(float %Val)
declare double @llvm.cos.f64(double %Val)
declare x86_fp80 @llvm.cos.f80(x86_fp80 %Val)
declare fp128 @llvm.cos.f128(fp128 %Val)
declare ppc_fp128 @llvm.cos.ppcf128(ppc_fp128 %Val)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.cos.*</tt>' intrinsics return the cosine of the operand.</p>
<h5>Arguments:</h5>
<p>The argument and return value are floating point numbers of the same
type.</p>
<h5>Semantics:</h5>
<p>This function returns the cosine of the specified operand, returning the same
values as the libm <tt>cos</tt> functions would, and handles error conditions
in the same way.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_pow">'<tt>llvm.pow.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.pow</tt> on any
floating point or vector of floating point type. Not all targets support all
types however.</p>
<pre>
declare float @llvm.pow.f32(float %Val, float %Power)
declare double @llvm.pow.f64(double %Val, double %Power)
declare x86_fp80 @llvm.pow.f80(x86_fp80 %Val, x86_fp80 %Power)
declare fp128 @llvm.pow.f128(fp128 %Val, fp128 %Power)
declare ppc_fp128 @llvm.pow.ppcf128(ppc_fp128 %Val, ppc_fp128 Power)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.pow.*</tt>' intrinsics return the first operand raised to the
specified (positive or negative) power.</p>
<h5>Arguments:</h5>
<p>The second argument is a floating point power, and the first is a value to
raise to that power.</p>
<h5>Semantics:</h5>
<p>This function returns the first value raised to the second power, returning
the same values as the libm <tt>pow</tt> functions would, and handles error
conditions in the same way.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_manip">Bit Manipulation Intrinsics</a>
</div>
<div class="doc_text">
<p>LLVM provides intrinsics for a few important bit manipulation operations.
These allow efficient code generation for some algorithms.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_bswap">'<tt>llvm.bswap.*</tt>' Intrinsics</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic function. You can use bswap on any integer
type that is an even number of bytes (i.e. BitWidth % 16 == 0).</p>
<pre>
declare i16 @llvm.bswap.i16(i16 &lt;id&gt;)
declare i32 @llvm.bswap.i32(i32 &lt;id&gt;)
declare i64 @llvm.bswap.i64(i64 &lt;id&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.bswap</tt>' family of intrinsics is used to byte swap integer
values with an even number of bytes (positive multiple of 16 bits). These
are useful for performing operations on data that is not in the target's
native byte order.</p>
<h5>Semantics:</h5>
<p>The <tt>llvm.bswap.i16</tt> intrinsic returns an i16 value that has the high
and low byte of the input i16 swapped. Similarly,
the <tt>llvm.bswap.i32</tt> intrinsic returns an i32 value that has the four
bytes of the input i32 swapped, so that if the input bytes are numbered 0, 1,
2, 3 then the returned i32 will have its bytes in 3, 2, 1, 0 order.
The <tt>llvm.bswap.i48</tt>, <tt>llvm.bswap.i64</tt> and other intrinsics
extend this concept to additional even-byte lengths (6 bytes, 8 bytes and
more, respectively).</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_ctpop">'<tt>llvm.ctpop.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use llvm.ctpop on any integer bit
width. Not all targets support all bit widths however.</p>
<pre>
declare i8 @llvm.ctpop.i8(i8 &lt;src&gt;)
declare i16 @llvm.ctpop.i16(i16 &lt;src&gt;)
declare i32 @llvm.ctpop.i32(i32 &lt;src&gt;)
declare i64 @llvm.ctpop.i64(i64 &lt;src&gt;)
declare i256 @llvm.ctpop.i256(i256 &lt;src&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.ctpop</tt>' family of intrinsics counts the number of bits set
in a value.</p>
<h5>Arguments:</h5>
<p>The only argument is the value to be counted. The argument may be of any
integer type. The return type must match the argument type.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.ctpop</tt>' intrinsic counts the 1's in a variable.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_ctlz">'<tt>llvm.ctlz.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.ctlz</tt> on any
integer bit width. Not all targets support all bit widths however.</p>
<pre>
declare i8 @llvm.ctlz.i8 (i8 &lt;src&gt;)
declare i16 @llvm.ctlz.i16(i16 &lt;src&gt;)
declare i32 @llvm.ctlz.i32(i32 &lt;src&gt;)
declare i64 @llvm.ctlz.i64(i64 &lt;src&gt;)
declare i256 @llvm.ctlz.i256(i256 &lt;src&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.ctlz</tt>' family of intrinsic functions counts the number of
leading zeros in a variable.</p>
<h5>Arguments:</h5>
<p>The only argument is the value to be counted. The argument may be of any
integer type. The return type must match the argument type.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.ctlz</tt>' intrinsic counts the leading (most significant)
zeros in a variable. If the src == 0 then the result is the size in bits of
the type of src. For example, <tt>llvm.ctlz(i32 2) = 30</tt>.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_cttz">'<tt>llvm.cttz.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.cttz</tt> on any
integer bit width. Not all targets support all bit widths however.</p>
<pre>
declare i8 @llvm.cttz.i8 (i8 &lt;src&gt;)
declare i16 @llvm.cttz.i16(i16 &lt;src&gt;)
declare i32 @llvm.cttz.i32(i32 &lt;src&gt;)
declare i64 @llvm.cttz.i64(i64 &lt;src&gt;)
declare i256 @llvm.cttz.i256(i256 &lt;src&gt;)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.cttz</tt>' family of intrinsic functions counts the number of
trailing zeros.</p>
<h5>Arguments:</h5>
<p>The only argument is the value to be counted. The argument may be of any
integer type. The return type must match the argument type.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.cttz</tt>' intrinsic counts the trailing (least significant)
zeros in a variable. If the src == 0 then the result is the size in bits of
the type of src. For example, <tt>llvm.cttz(2) = 1</tt>.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_overflow">Arithmetic with Overflow Intrinsics</a>
</div>
<div class="doc_text">
<p>LLVM provides intrinsics for some arithmetic with overflow operations.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_sadd_overflow">'<tt>llvm.sadd.with.overflow.*</tt>' Intrinsics</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.sadd.with.overflow</tt>
on any integer bit width.</p>
<pre>
declare {i16, i1} @llvm.sadd.with.overflow.i16(i16 %a, i16 %b)
declare {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %b)
declare {i64, i1} @llvm.sadd.with.overflow.i64(i64 %a, i64 %b)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.sadd.with.overflow</tt>' family of intrinsic functions perform
a signed addition of the two arguments, and indicate whether an overflow
occurred during the signed summation.</p>
<h5>Arguments:</h5>
<p>The arguments (%a and %b) and the first element of the result structure may
be of integer types of any bit width, but they must have the same bit
width. The second element of the result structure must be of
type <tt>i1</tt>. <tt>%a</tt> and <tt>%b</tt> are the two values that will
undergo signed addition.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.sadd.with.overflow</tt>' family of intrinsic functions perform
a signed addition of the two variables. They return a structure &mdash; the
first element of which is the signed summation, and the second element of
which is a bit specifying if the signed summation resulted in an
overflow.</p>
<h5>Examples:</h5>
<pre>
%res = call {i32, i1} @llvm.sadd.with.overflow.i32(i32 %a, i32 %b)
%sum = extractvalue {i32, i1} %res, 0
%obit = extractvalue {i32, i1} %res, 1
br i1 %obit, label %overflow, label %normal
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_uadd_overflow">'<tt>llvm.uadd.with.overflow.*</tt>' Intrinsics</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.uadd.with.overflow</tt>
on any integer bit width.</p>
<pre>
declare {i16, i1} @llvm.uadd.with.overflow.i16(i16 %a, i16 %b)
declare {i32, i1} @llvm.uadd.with.overflow.i32(i32 %a, i32 %b)
declare {i64, i1} @llvm.uadd.with.overflow.i64(i64 %a, i64 %b)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.uadd.with.overflow</tt>' family of intrinsic functions perform
an unsigned addition of the two arguments, and indicate whether a carry
occurred during the unsigned summation.</p>
<h5>Arguments:</h5>
<p>The arguments (%a and %b) and the first element of the result structure may
be of integer types of any bit width, but they must have the same bit
width. The second element of the result structure must be of
type <tt>i1</tt>. <tt>%a</tt> and <tt>%b</tt> are the two values that will
undergo unsigned addition.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.uadd.with.overflow</tt>' family of intrinsic functions perform
an unsigned addition of the two arguments. They return a structure &mdash;
the first element of which is the sum, and the second element of which is a
bit specifying if the unsigned summation resulted in a carry.</p>
<h5>Examples:</h5>
<pre>
%res = call {i32, i1} @llvm.uadd.with.overflow.i32(i32 %a, i32 %b)
%sum = extractvalue {i32, i1} %res, 0
%obit = extractvalue {i32, i1} %res, 1
br i1 %obit, label %carry, label %normal
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_ssub_overflow">'<tt>llvm.ssub.with.overflow.*</tt>' Intrinsics</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.ssub.with.overflow</tt>
on any integer bit width.</p>
<pre>
declare {i16, i1} @llvm.ssub.with.overflow.i16(i16 %a, i16 %b)
declare {i32, i1} @llvm.ssub.with.overflow.i32(i32 %a, i32 %b)
declare {i64, i1} @llvm.ssub.with.overflow.i64(i64 %a, i64 %b)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.ssub.with.overflow</tt>' family of intrinsic functions perform
a signed subtraction of the two arguments, and indicate whether an overflow
occurred during the signed subtraction.</p>
<h5>Arguments:</h5>
<p>The arguments (%a and %b) and the first element of the result structure may
be of integer types of any bit width, but they must have the same bit
width. The second element of the result structure must be of
type <tt>i1</tt>. <tt>%a</tt> and <tt>%b</tt> are the two values that will
undergo signed subtraction.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.ssub.with.overflow</tt>' family of intrinsic functions perform
a signed subtraction of the two arguments. They return a structure &mdash;
the first element of which is the subtraction, and the second element of
which is a bit specifying if the signed subtraction resulted in an
overflow.</p>
<h5>Examples:</h5>
<pre>
%res = call {i32, i1} @llvm.ssub.with.overflow.i32(i32 %a, i32 %b)
%sum = extractvalue {i32, i1} %res, 0
%obit = extractvalue {i32, i1} %res, 1
br i1 %obit, label %overflow, label %normal
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_usub_overflow">'<tt>llvm.usub.with.overflow.*</tt>' Intrinsics</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.usub.with.overflow</tt>
on any integer bit width.</p>
<pre>
declare {i16, i1} @llvm.usub.with.overflow.i16(i16 %a, i16 %b)
declare {i32, i1} @llvm.usub.with.overflow.i32(i32 %a, i32 %b)
declare {i64, i1} @llvm.usub.with.overflow.i64(i64 %a, i64 %b)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.usub.with.overflow</tt>' family of intrinsic functions perform
an unsigned subtraction of the two arguments, and indicate whether an
overflow occurred during the unsigned subtraction.</p>
<h5>Arguments:</h5>
<p>The arguments (%a and %b) and the first element of the result structure may
be of integer types of any bit width, but they must have the same bit
width. The second element of the result structure must be of
type <tt>i1</tt>. <tt>%a</tt> and <tt>%b</tt> are the two values that will
undergo unsigned subtraction.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.usub.with.overflow</tt>' family of intrinsic functions perform
an unsigned subtraction of the two arguments. They return a structure &mdash;
the first element of which is the subtraction, and the second element of
which is a bit specifying if the unsigned subtraction resulted in an
overflow.</p>
<h5>Examples:</h5>
<pre>
%res = call {i32, i1} @llvm.usub.with.overflow.i32(i32 %a, i32 %b)
%sum = extractvalue {i32, i1} %res, 0
%obit = extractvalue {i32, i1} %res, 1
br i1 %obit, label %overflow, label %normal
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_smul_overflow">'<tt>llvm.smul.with.overflow.*</tt>' Intrinsics</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.smul.with.overflow</tt>
on any integer bit width.</p>
<pre>
declare {i16, i1} @llvm.smul.with.overflow.i16(i16 %a, i16 %b)
declare {i32, i1} @llvm.smul.with.overflow.i32(i32 %a, i32 %b)
declare {i64, i1} @llvm.smul.with.overflow.i64(i64 %a, i64 %b)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.smul.with.overflow</tt>' family of intrinsic functions perform
a signed multiplication of the two arguments, and indicate whether an
overflow occurred during the signed multiplication.</p>
<h5>Arguments:</h5>
<p>The arguments (%a and %b) and the first element of the result structure may
be of integer types of any bit width, but they must have the same bit
width. The second element of the result structure must be of
type <tt>i1</tt>. <tt>%a</tt> and <tt>%b</tt> are the two values that will
undergo signed multiplication.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.smul.with.overflow</tt>' family of intrinsic functions perform
a signed multiplication of the two arguments. They return a structure &mdash;
the first element of which is the multiplication, and the second element of
which is a bit specifying if the signed multiplication resulted in an
overflow.</p>
<h5>Examples:</h5>
<pre>
%res = call {i32, i1} @llvm.smul.with.overflow.i32(i32 %a, i32 %b)
%sum = extractvalue {i32, i1} %res, 0
%obit = extractvalue {i32, i1} %res, 1
br i1 %obit, label %overflow, label %normal
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_umul_overflow">'<tt>llvm.umul.with.overflow.*</tt>' Intrinsics</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.umul.with.overflow</tt>
on any integer bit width.</p>
<pre>
declare {i16, i1} @llvm.umul.with.overflow.i16(i16 %a, i16 %b)
declare {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b)
declare {i64, i1} @llvm.umul.with.overflow.i64(i64 %a, i64 %b)
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.umul.with.overflow</tt>' family of intrinsic functions perform
a unsigned multiplication of the two arguments, and indicate whether an
overflow occurred during the unsigned multiplication.</p>
<h5>Arguments:</h5>
<p>The arguments (%a and %b) and the first element of the result structure may
be of integer types of any bit width, but they must have the same bit
width. The second element of the result structure must be of
type <tt>i1</tt>. <tt>%a</tt> and <tt>%b</tt> are the two values that will
undergo unsigned multiplication.</p>
<h5>Semantics:</h5>
<p>The '<tt>llvm.umul.with.overflow</tt>' family of intrinsic functions perform
an unsigned multiplication of the two arguments. They return a structure
&mdash; the first element of which is the multiplication, and the second
element of which is a bit specifying if the unsigned multiplication resulted
in an overflow.</p>
<h5>Examples:</h5>
<pre>
%res = call {i32, i1} @llvm.umul.with.overflow.i32(i32 %a, i32 %b)
%sum = extractvalue {i32, i1} %res, 0
%obit = extractvalue {i32, i1} %res, 1
br i1 %obit, label %overflow, label %normal
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_debugger">Debugger Intrinsics</a>
</div>
<div class="doc_text">
<p>The LLVM debugger intrinsics (which all start with <tt>llvm.dbg.</tt>
prefix), are described in
the <a href="SourceLevelDebugging.html#format_common_intrinsics">LLVM Source
Level Debugging</a> document.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_eh">Exception Handling Intrinsics</a>
</div>
<div class="doc_text">
<p>The LLVM exception handling intrinsics (which all start with
<tt>llvm.eh.</tt> prefix), are described in
the <a href="ExceptionHandling.html#format_common_intrinsics">LLVM Exception
Handling</a> document.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_trampoline">Trampoline Intrinsic</a>
</div>
<div class="doc_text">
<p>This intrinsic makes it possible to excise one parameter, marked with
the <tt>nest</tt> attribute, from a function. The result is a callable
function pointer lacking the nest parameter - the caller does not need to
provide a value for it. Instead, the value to use is stored in advance in a
"trampoline", a block of memory usually allocated on the stack, which also
contains code to splice the nest value into the argument list. This is used
to implement the GCC nested function address extension.</p>
<p>For example, if the function is
<tt>i32 f(i8* nest %c, i32 %x, i32 %y)</tt> then the resulting function
pointer has signature <tt>i32 (i32, i32)*</tt>. It can be created as
follows:</p>
<div class="doc_code">
<pre>
%tramp = alloca [10 x i8], align 4 ; size and alignment only correct for X86
%tramp1 = getelementptr [10 x i8]* %tramp, i32 0, i32 0
%p = call i8* @llvm.init.trampoline( i8* %tramp1, i8* bitcast (i32 (i8* nest , i32, i32)* @f to i8*), i8* %nval )
%fp = bitcast i8* %p to i32 (i32, i32)*
</pre>
</div>
<p>The call <tt>%val = call i32 %fp( i32 %x, i32 %y )</tt> is then equivalent
to <tt>%val = call i32 %f( i8* %nval, i32 %x, i32 %y )</tt>.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_it">'<tt>llvm.init.trampoline</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare i8* @llvm.init.trampoline(i8* &lt;tramp&gt;, i8* &lt;func&gt;, i8* &lt;nval&gt;)
</pre>
<h5>Overview:</h5>
<p>This fills the memory pointed to by <tt>tramp</tt> with code and returns a
function pointer suitable for executing it.</p>
<h5>Arguments:</h5>
<p>The <tt>llvm.init.trampoline</tt> intrinsic takes three arguments, all
pointers. The <tt>tramp</tt> argument must point to a sufficiently large and
sufficiently aligned block of memory; this memory is written to by the
intrinsic. Note that the size and the alignment are target-specific - LLVM
currently provides no portable way of determining them, so a front-end that
generates this intrinsic needs to have some target-specific knowledge.
The <tt>func</tt> argument must hold a function bitcast to
an <tt>i8*</tt>.</p>
<h5>Semantics:</h5>
<p>The block of memory pointed to by <tt>tramp</tt> is filled with target
dependent code, turning it into a function. A pointer to this function is
returned, but needs to be bitcast to an <a href="#int_trampoline">appropriate
function pointer type</a> before being called. The new function's signature
is the same as that of <tt>func</tt> with any arguments marked with
the <tt>nest</tt> attribute removed. At most one such <tt>nest</tt> argument
is allowed, and it must be of pointer type. Calling the new function is
equivalent to calling <tt>func</tt> with the same argument list, but
with <tt>nval</tt> used for the missing <tt>nest</tt> argument. If, after
calling <tt>llvm.init.trampoline</tt>, the memory pointed to
by <tt>tramp</tt> is modified, then the effect of any later call to the
returned function pointer is undefined.</p>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_atomics">Atomic Operations and Synchronization Intrinsics</a>
</div>
<div class="doc_text">
<p>These intrinsic functions expand the "universal IR" of LLVM to represent
hardware constructs for atomic operations and memory synchronization. This
provides an interface to the hardware, not an interface to the programmer. It
is aimed at a low enough level to allow any programming models or APIs
(Application Programming Interfaces) which need atomic behaviors to map
cleanly onto it. It is also modeled primarily on hardware behavior. Just as
hardware provides a "universal IR" for source languages, it also provides a
starting point for developing a "universal" atomic operation and
synchronization IR.</p>
<p>These do <em>not</em> form an API such as high-level threading libraries,
software transaction memory systems, atomic primitives, and intrinsic
functions as found in BSD, GNU libc, atomic_ops, APR, and other system and
application libraries. The hardware interface provided by LLVM should allow
a clean implementation of all of these APIs and parallel programming models.
No one model or paradigm should be selected above others unless the hardware
itself ubiquitously does so.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_memory_barrier">'<tt>llvm.memory.barrier</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.memory.barrier( i1 &lt;ll&gt;, i1 &lt;ls&gt;, i1 &lt;sl&gt;, i1 &lt;ss&gt;, i1 &lt;device&gt; )
</pre>
<h5>Overview:</h5>
<p>The <tt>llvm.memory.barrier</tt> intrinsic guarantees ordering between
specific pairs of memory access types.</p>
<h5>Arguments:</h5>
<p>The <tt>llvm.memory.barrier</tt> intrinsic requires five boolean arguments.
The first four arguments enables a specific barrier as listed below. The
fith argument specifies that the barrier applies to io or device or uncached
memory.</p>
<ul>
<li><tt>ll</tt>: load-load barrier</li>
<li><tt>ls</tt>: load-store barrier</li>
<li><tt>sl</tt>: store-load barrier</li>
<li><tt>ss</tt>: store-store barrier</li>
<li><tt>device</tt>: barrier applies to device and uncached memory also.</li>
</ul>
<h5>Semantics:</h5>
<p>This intrinsic causes the system to enforce some ordering constraints upon
the loads and stores of the program. This barrier does not
indicate <em>when</em> any events will occur, it only enforces
an <em>order</em> in which they occur. For any of the specified pairs of load
and store operations (f.ex. load-load, or store-load), all of the first
operations preceding the barrier will complete before any of the second
operations succeeding the barrier begin. Specifically the semantics for each
pairing is as follows:</p>
<ul>
<li><tt>ll</tt>: All loads before the barrier must complete before any load
after the barrier begins.</li>
<li><tt>ls</tt>: All loads before the barrier must complete before any
store after the barrier begins.</li>
<li><tt>ss</tt>: All stores before the barrier must complete before any
store after the barrier begins.</li>
<li><tt>sl</tt>: All stores before the barrier must complete before any
load after the barrier begins.</li>
</ul>
<p>These semantics are applied with a logical "and" behavior when more than one
is enabled in a single memory barrier intrinsic.</p>
<p>Backends may implement stronger barriers than those requested when they do
not support as fine grained a barrier as requested. Some architectures do
not need all types of barriers and on such architectures, these become
noops.</p>
<h5>Example:</h5>
<pre>
%ptr = malloc i32
store i32 4, %ptr
%result1 = load i32* %ptr <i>; yields {i32}:result1 = 4</i>
call void @llvm.memory.barrier( i1 false, i1 true, i1 false, i1 false )
<i>; guarantee the above finishes</i>
store i32 8, %ptr <i>; before this begins</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_atomic_cmp_swap">'<tt>llvm.atomic.cmp.swap.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.atomic.cmp.swap</tt> on
any integer bit width and for different address spaces. Not all targets
support all bit widths however.</p>
<pre>
declare i8 @llvm.atomic.cmp.swap.i8.p0i8( i8* &lt;ptr&gt;, i8 &lt;cmp&gt;, i8 &lt;val&gt; )
declare i16 @llvm.atomic.cmp.swap.i16.p0i16( i16* &lt;ptr&gt;, i16 &lt;cmp&gt;, i16 &lt;val&gt; )
declare i32 @llvm.atomic.cmp.swap.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;cmp&gt;, i32 &lt;val&gt; )
declare i64 @llvm.atomic.cmp.swap.i64.p0i64( i64* &lt;ptr&gt;, i64 &lt;cmp&gt;, i64 &lt;val&gt; )
</pre>
<h5>Overview:</h5>
<p>This loads a value in memory and compares it to a given value. If they are
equal, it stores a new value into the memory.</p>
<h5>Arguments:</h5>
<p>The <tt>llvm.atomic.cmp.swap</tt> intrinsic takes three arguments. The result
as well as both <tt>cmp</tt> and <tt>val</tt> must be integer values with the
same bit width. The <tt>ptr</tt> argument must be a pointer to a value of
this integer type. While any bit width integer may be used, targets may only
lower representations they support in hardware.</p>
<h5>Semantics:</h5>
<p>This entire intrinsic must be executed atomically. It first loads the value
in memory pointed to by <tt>ptr</tt> and compares it with the
value <tt>cmp</tt>. If they are equal, <tt>val</tt> is stored into the
memory. The loaded value is yielded in all cases. This provides the
equivalent of an atomic compare-and-swap operation within the SSA
framework.</p>
<h5>Examples:</h5>
<pre>
%ptr = malloc i32
store i32 4, %ptr
%val1 = add i32 4, 4
%result1 = call i32 @llvm.atomic.cmp.swap.i32.p0i32( i32* %ptr, i32 4, %val1 )
<i>; yields {i32}:result1 = 4</i>
%stored1 = icmp eq i32 %result1, 4 <i>; yields {i1}:stored1 = true</i>
%memval1 = load i32* %ptr <i>; yields {i32}:memval1 = 8</i>
%val2 = add i32 1, 1
%result2 = call i32 @llvm.atomic.cmp.swap.i32.p0i32( i32* %ptr, i32 5, %val2 )
<i>; yields {i32}:result2 = 8</i>
%stored2 = icmp eq i32 %result2, 5 <i>; yields {i1}:stored2 = false</i>
%memval2 = load i32* %ptr <i>; yields {i32}:memval2 = 8</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_atomic_swap">'<tt>llvm.atomic.swap.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.atomic.swap</tt> on any
integer bit width. Not all targets support all bit widths however.</p>
<pre>
declare i8 @llvm.atomic.swap.i8.p0i8( i8* &lt;ptr&gt;, i8 &lt;val&gt; )
declare i16 @llvm.atomic.swap.i16.p0i16( i16* &lt;ptr&gt;, i16 &lt;val&gt; )
declare i32 @llvm.atomic.swap.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;val&gt; )
declare i64 @llvm.atomic.swap.i64.p0i64( i64* &lt;ptr&gt;, i64 &lt;val&gt; )
</pre>
<h5>Overview:</h5>
<p>This intrinsic loads the value stored in memory at <tt>ptr</tt> and yields
the value from memory. It then stores the value in <tt>val</tt> in the memory
at <tt>ptr</tt>.</p>
<h5>Arguments:</h5>
<p>The <tt>llvm.atomic.swap</tt> intrinsic takes two arguments. Both
the <tt>val</tt> argument and the result must be integers of the same bit
width. The first argument, <tt>ptr</tt>, must be a pointer to a value of this
integer type. The targets may only lower integer representations they
support.</p>
<h5>Semantics:</h5>
<p>This intrinsic loads the value pointed to by <tt>ptr</tt>, yields it, and
stores <tt>val</tt> back into <tt>ptr</tt> atomically. This provides the
equivalent of an atomic swap operation within the SSA framework.</p>
<h5>Examples:</h5>
<pre>
%ptr = malloc i32
store i32 4, %ptr
%val1 = add i32 4, 4
%result1 = call i32 @llvm.atomic.swap.i32.p0i32( i32* %ptr, i32 %val1 )
<i>; yields {i32}:result1 = 4</i>
%stored1 = icmp eq i32 %result1, 4 <i>; yields {i1}:stored1 = true</i>
%memval1 = load i32* %ptr <i>; yields {i32}:memval1 = 8</i>
%val2 = add i32 1, 1
%result2 = call i32 @llvm.atomic.swap.i32.p0i32( i32* %ptr, i32 %val2 )
<i>; yields {i32}:result2 = 8</i>
%stored2 = icmp eq i32 %result2, 8 <i>; yields {i1}:stored2 = true</i>
%memval2 = load i32* %ptr <i>; yields {i32}:memval2 = 2</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_atomic_load_add">'<tt>llvm.atomic.load.add.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.atomic.load.add</tt> on
any integer bit width. Not all targets support all bit widths however.</p>
<pre>
declare i8 @llvm.atomic.load.add.i8..p0i8( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.add.i16..p0i16( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.add.i32..p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.add.i64..p0i64( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<h5>Overview:</h5>
<p>This intrinsic adds <tt>delta</tt> to the value stored in memory
at <tt>ptr</tt>. It yields the original value at <tt>ptr</tt>.</p>
<h5>Arguments:</h5>
<p>The intrinsic takes two arguments, the first a pointer to an integer value
and the second an integer value. The result is also an integer value. These
integer types can have any bit width, but they must all have the same bit
width. The targets may only lower integer representations they support.</p>
<h5>Semantics:</h5>
<p>This intrinsic does a series of operations atomically. It first loads the
value stored at <tt>ptr</tt>. It then adds <tt>delta</tt>, stores the result
to <tt>ptr</tt>. It yields the original value stored at <tt>ptr</tt>.</p>
<h5>Examples:</h5>
<pre>
%ptr = malloc i32
store i32 4, %ptr
%result1 = call i32 @llvm.atomic.load.add.i32.p0i32( i32* %ptr, i32 4 )
<i>; yields {i32}:result1 = 4</i>
%result2 = call i32 @llvm.atomic.load.add.i32.p0i32( i32* %ptr, i32 2 )
<i>; yields {i32}:result2 = 8</i>
%result3 = call i32 @llvm.atomic.load.add.i32.p0i32( i32* %ptr, i32 5 )
<i>; yields {i32}:result3 = 10</i>
%memval1 = load i32* %ptr <i>; yields {i32}:memval1 = 15</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_atomic_load_sub">'<tt>llvm.atomic.load.sub.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use <tt>llvm.atomic.load.sub</tt> on
any integer bit width and for different address spaces. Not all targets
support all bit widths however.</p>
<pre>
declare i8 @llvm.atomic.load.sub.i8.p0i32( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.sub.i16.p0i32( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.sub.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.sub.i64.p0i32( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<h5>Overview:</h5>
<p>This intrinsic subtracts <tt>delta</tt> to the value stored in memory at
<tt>ptr</tt>. It yields the original value at <tt>ptr</tt>.</p>
<h5>Arguments:</h5>
<p>The intrinsic takes two arguments, the first a pointer to an integer value
and the second an integer value. The result is also an integer value. These
integer types can have any bit width, but they must all have the same bit
width. The targets may only lower integer representations they support.</p>
<h5>Semantics:</h5>
<p>This intrinsic does a series of operations atomically. It first loads the
value stored at <tt>ptr</tt>. It then subtracts <tt>delta</tt>, stores the
result to <tt>ptr</tt>. It yields the original value stored
at <tt>ptr</tt>.</p>
<h5>Examples:</h5>
<pre>
%ptr = malloc i32
store i32 8, %ptr
%result1 = call i32 @llvm.atomic.load.sub.i32.p0i32( i32* %ptr, i32 4 )
<i>; yields {i32}:result1 = 8</i>
%result2 = call i32 @llvm.atomic.load.sub.i32.p0i32( i32* %ptr, i32 2 )
<i>; yields {i32}:result2 = 4</i>
%result3 = call i32 @llvm.atomic.load.sub.i32.p0i32( i32* %ptr, i32 5 )
<i>; yields {i32}:result3 = 2</i>
%memval1 = load i32* %ptr <i>; yields {i32}:memval1 = -3</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_atomic_load_and">'<tt>llvm.atomic.load.and.*</tt>' Intrinsic</a><br>
<a name="int_atomic_load_nand">'<tt>llvm.atomic.load.nand.*</tt>' Intrinsic</a><br>
<a name="int_atomic_load_or">'<tt>llvm.atomic.load.or.*</tt>' Intrinsic</a><br>
<a name="int_atomic_load_xor">'<tt>llvm.atomic.load.xor.*</tt>' Intrinsic</a><br>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>These are overloaded intrinsics. You can
use <tt>llvm.atomic.load_and</tt>, <tt>llvm.atomic.load_nand</tt>,
<tt>llvm.atomic.load_or</tt>, and <tt>llvm.atomic.load_xor</tt> on any integer
bit width and for different address spaces. Not all targets support all bit
widths however.</p>
<pre>
declare i8 @llvm.atomic.load.and.i8.p0i8( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.and.i16.p0i16( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.and.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.and.i64.p0i64( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<pre>
declare i8 @llvm.atomic.load.or.i8.p0i8( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.or.i16.p0i16( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.or.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.or.i64.p0i64( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<pre>
declare i8 @llvm.atomic.load.nand.i8.p0i32( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.nand.i16.p0i32( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.nand.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.nand.i64.p0i32( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<pre>
declare i8 @llvm.atomic.load.xor.i8.p0i32( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.xor.i16.p0i32( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.xor.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.xor.i64.p0i32( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<h5>Overview:</h5>
<p>These intrinsics bitwise the operation (and, nand, or, xor) <tt>delta</tt> to
the value stored in memory at <tt>ptr</tt>. It yields the original value
at <tt>ptr</tt>.</p>
<h5>Arguments:</h5>
<p>These intrinsics take two arguments, the first a pointer to an integer value
and the second an integer value. The result is also an integer value. These
integer types can have any bit width, but they must all have the same bit
width. The targets may only lower integer representations they support.</p>
<h5>Semantics:</h5>
<p>These intrinsics does a series of operations atomically. They first load the
value stored at <tt>ptr</tt>. They then do the bitwise
operation <tt>delta</tt>, store the result to <tt>ptr</tt>. They yield the
original value stored at <tt>ptr</tt>.</p>
<h5>Examples:</h5>
<pre>
%ptr = malloc i32
store i32 0x0F0F, %ptr
%result0 = call i32 @llvm.atomic.load.nand.i32.p0i32( i32* %ptr, i32 0xFF )
<i>; yields {i32}:result0 = 0x0F0F</i>
%result1 = call i32 @llvm.atomic.load.and.i32.p0i32( i32* %ptr, i32 0xFF )
<i>; yields {i32}:result1 = 0xFFFFFFF0</i>
%result2 = call i32 @llvm.atomic.load.or.i32.p0i32( i32* %ptr, i32 0F )
<i>; yields {i32}:result2 = 0xF0</i>
%result3 = call i32 @llvm.atomic.load.xor.i32.p0i32( i32* %ptr, i32 0F )
<i>; yields {i32}:result3 = FF</i>
%memval1 = load i32* %ptr <i>; yields {i32}:memval1 = F0</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_atomic_load_max">'<tt>llvm.atomic.load.max.*</tt>' Intrinsic</a><br>
<a name="int_atomic_load_min">'<tt>llvm.atomic.load.min.*</tt>' Intrinsic</a><br>
<a name="int_atomic_load_umax">'<tt>llvm.atomic.load.umax.*</tt>' Intrinsic</a><br>
<a name="int_atomic_load_umin">'<tt>llvm.atomic.load.umin.*</tt>' Intrinsic</a><br>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>These are overloaded intrinsics. You can use <tt>llvm.atomic.load_max</tt>,
<tt>llvm.atomic.load_min</tt>, <tt>llvm.atomic.load_umax</tt>, and
<tt>llvm.atomic.load_umin</tt> on any integer bit width and for different
address spaces. Not all targets support all bit widths however.</p>
<pre>
declare i8 @llvm.atomic.load.max.i8.p0i8( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.max.i16.p0i16( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.max.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.max.i64.p0i64( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<pre>
declare i8 @llvm.atomic.load.min.i8.p0i8( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.min.i16.p0i16( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.min.i32..p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.min.i64..p0i64( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<pre>
declare i8 @llvm.atomic.load.umax.i8.p0i8( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.umax.i16.p0i16( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.umax.i32.p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.umax.i64.p0i64( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<pre>
declare i8 @llvm.atomic.load.umin.i8..p0i8( i8* &lt;ptr&gt;, i8 &lt;delta&gt; )
declare i16 @llvm.atomic.load.umin.i16.p0i16( i16* &lt;ptr&gt;, i16 &lt;delta&gt; )
declare i32 @llvm.atomic.load.umin.i32..p0i32( i32* &lt;ptr&gt;, i32 &lt;delta&gt; )
declare i64 @llvm.atomic.load.umin.i64..p0i64( i64* &lt;ptr&gt;, i64 &lt;delta&gt; )
</pre>
<h5>Overview:</h5>
<p>These intrinsics takes the signed or unsigned minimum or maximum of
<tt>delta</tt> and the value stored in memory at <tt>ptr</tt>. It yields the
original value at <tt>ptr</tt>.</p>
<h5>Arguments:</h5>
<p>These intrinsics take two arguments, the first a pointer to an integer value
and the second an integer value. The result is also an integer value. These
integer types can have any bit width, but they must all have the same bit
width. The targets may only lower integer representations they support.</p>
<h5>Semantics:</h5>
<p>These intrinsics does a series of operations atomically. They first load the
value stored at <tt>ptr</tt>. They then do the signed or unsigned min or
max <tt>delta</tt> and the value, store the result to <tt>ptr</tt>. They
yield the original value stored at <tt>ptr</tt>.</p>
<h5>Examples:</h5>
<pre>
%ptr = malloc i32
store i32 7, %ptr
%result0 = call i32 @llvm.atomic.load.min.i32.p0i32( i32* %ptr, i32 -2 )
<i>; yields {i32}:result0 = 7</i>
%result1 = call i32 @llvm.atomic.load.max.i32.p0i32( i32* %ptr, i32 8 )
<i>; yields {i32}:result1 = -2</i>
%result2 = call i32 @llvm.atomic.load.umin.i32.p0i32( i32* %ptr, i32 10 )
<i>; yields {i32}:result2 = 8</i>
%result3 = call i32 @llvm.atomic.load.umax.i32.p0i32( i32* %ptr, i32 30 )
<i>; yields {i32}:result3 = 8</i>
%memval1 = load i32* %ptr <i>; yields {i32}:memval1 = 30</i>
</pre>
</div>
<!-- ======================================================================= -->
<div class="doc_subsection">
<a name="int_general">General Intrinsics</a>
</div>
<div class="doc_text">
<p>This class of intrinsics is designed to be generic and has no specific
purpose.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_var_annotation">'<tt>llvm.var.annotation</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.var.annotation(i8* &lt;val&gt;, i8* &lt;str&gt;, i8* &lt;str&gt;, i32 &lt;int&gt; )
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.var.annotation</tt>' intrinsic.</p>
<h5>Arguments:</h5>
<p>The first argument is a pointer to a value, the second is a pointer to a
global string, the third is a pointer to a global string which is the source
file name, and the last argument is the line number.</p>
<h5>Semantics:</h5>
<p>This intrinsic allows annotation of local variables with arbitrary strings.
This can be useful for special purpose optimizations that want to look for
these annotations. These have no other defined use, they are ignored by code
generation and optimization.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_annotation">'<tt>llvm.annotation.*</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<p>This is an overloaded intrinsic. You can use '<tt>llvm.annotation</tt>' on
any integer bit width.</p>
<pre>
declare i8 @llvm.annotation.i8(i8 &lt;val&gt;, i8* &lt;str&gt;, i8* &lt;str&gt;, i32 &lt;int&gt; )
declare i16 @llvm.annotation.i16(i16 &lt;val&gt;, i8* &lt;str&gt;, i8* &lt;str&gt;, i32 &lt;int&gt; )
declare i32 @llvm.annotation.i32(i32 &lt;val&gt;, i8* &lt;str&gt;, i8* &lt;str&gt;, i32 &lt;int&gt; )
declare i64 @llvm.annotation.i64(i64 &lt;val&gt;, i8* &lt;str&gt;, i8* &lt;str&gt;, i32 &lt;int&gt; )
declare i256 @llvm.annotation.i256(i256 &lt;val&gt;, i8* &lt;str&gt;, i8* &lt;str&gt;, i32 &lt;int&gt; )
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.annotation</tt>' intrinsic.</p>
<h5>Arguments:</h5>
<p>The first argument is an integer value (result of some expression), the
second is a pointer to a global string, the third is a pointer to a global
string which is the source file name, and the last argument is the line
number. It returns the value of the first argument.</p>
<h5>Semantics:</h5>
<p>This intrinsic allows annotations to be put on arbitrary expressions with
arbitrary strings. This can be useful for special purpose optimizations that
want to look for these annotations. These have no other defined use, they
are ignored by code generation and optimization.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_trap">'<tt>llvm.trap</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.trap()
</pre>
<h5>Overview:</h5>
<p>The '<tt>llvm.trap</tt>' intrinsic.</p>
<h5>Arguments:</h5>
<p>None.</p>
<h5>Semantics:</h5>
<p>This intrinsics is lowered to the target dependent trap instruction. If the
target does not have a trap instruction, this intrinsic will be lowered to
the call of the <tt>abort()</tt> function.</p>
</div>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
<a name="int_stackprotector">'<tt>llvm.stackprotector</tt>' Intrinsic</a>
</div>
<div class="doc_text">
<h5>Syntax:</h5>
<pre>
declare void @llvm.stackprotector( i8* &lt;guard&gt;, i8** &lt;slot&gt; )
</pre>
<h5>Overview:</h5>
<p>The <tt>llvm.stackprotector</tt> intrinsic takes the <tt>guard</tt> and
stores it onto the stack at <tt>slot</tt>. The stack slot is adjusted to
ensure that it is placed on the stack before local variables.</p>
<h5>Arguments:</h5>
<p>The <tt>llvm.stackprotector</tt> intrinsic requires two pointer
arguments. The first argument is the value loaded from the stack
guard <tt>@__stack_chk_guard</tt>. The second variable is an <tt>alloca</tt>
that has enough space to hold the value of the guard.</p>
<h5>Semantics:</h5>
<p>This intrinsic causes the prologue/epilogue inserter to force the position of
the <tt>AllocaInst</tt> stack slot to be before local variables on the
stack. This is to ensure that if a local variable on the stack is
overwritten, it will destroy the value of the guard. When the function exits,
the guard on the stack is checked against the original guard. If they're
different, then the program aborts by calling the <tt>__stack_chk_fail()</tt>
function.</p>
</div>
<!-- *********************************************************************** -->
<hr>
<address>
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="http://jigsaw.w3.org/css-validator/images/vcss-blue" alt="Valid CSS"></a>
<a href="http://validator.w3.org/check/referer"><img
src="http://www.w3.org/Icons/valid-html401-blue" alt="Valid HTML 4.01"></a>
<a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
Last modified: $Date$
</address>
</body>
</html>