llvm-6502/include/llvm/IR
David Majnemer 594e4a1dd3 InstSimplify: Simplify trivial pointer expressions like b + (e - b)
consider:
long long *f(long long *b, long long *e) {
  return b + (e - b);
}

we would lower this to something like:
define i64* @f(i64* %b, i64* %e) {
  %1 = ptrtoint i64* %e to i64
  %2 = ptrtoint i64* %b to i64
  %3 = sub i64 %1, %2
  %4 = ashr exact i64 %3, 3
  %5 = getelementptr inbounds i64* %b, i64 %4
  ret i64* %5
}

This should fold away to just 'e'.

N.B.  This adds m_SpecificInt as a convenient way to match against a
particular 64-bit integer when using LLVM's match interface.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216439 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-26 05:55:16 +00:00
..
Argument.h Provide convenient access to the zext/sext attributes of function arguments. NFC. 2014-08-05 05:43:41 +00:00
AssemblyAnnotationWriter.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Attributes.h Add a dereferenceable attribute 2014-07-18 15:51:28 +00:00
AutoUpgrade.h Rename loop unrolling and loop vectorizer metadata to have a common prefix. 2014-06-25 15:41:00 +00:00
BasicBlock.h Move helper for getting a terminating musttail call to BasicBlock 2014-08-12 00:05:15 +00:00
CallingConv.h Revert "[ms-cxxabi] Add a new calling convention that swaps 'this' and 'sret'" 2014-05-09 22:56:42 +00:00
CallSite.h Add a dereferenceable attribute 2014-07-18 15:51:28 +00:00
CFG.h Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
CMakeLists.txt
Comdat.h IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
Constant.h InstCombine: sub nsw %x, C -> add nsw %x, -C if C isn't INT_MIN 2014-08-22 16:41:23 +00:00
ConstantFolder.h Add CreatePointerBitCastOrAddrSpaceCast to IRBuilder and co. 2014-07-14 17:24:35 +00:00
ConstantRange.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
Constants.h Constants.h: Fix possible typo in r216015. [-Wdocumentation] 2014-08-20 04:22:47 +00:00
DataLayout.h Fix typo 2014-06-25 23:39:08 +00:00
DebugInfo.h Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks. 2014-08-21 22:45:21 +00:00
DebugLoc.h Add missing const specifier to a const method. 2014-06-05 14:32:15 +00:00
DerivedTypes.h IR: remove dead code 2014-08-25 00:28:27 +00:00
DiagnosticInfo.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DiagnosticPrinter.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DIBuilder.h Use DILexicalBlockFile, rather than DILexicalBlock, to track discriminator changes to ensure discriminator changes don't introduce new DWARF DW_TAG_lexical_blocks. 2014-08-21 22:45:21 +00:00
Dominators.h Move operator[] to DomTreeNodeBase 2014-07-02 06:50:48 +00:00
Function.h Add a dereferenceable attribute 2014-07-18 15:51:28 +00:00
GetElementPtrTypeIterator.h [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-09 06:08:46 +00:00
GlobalAlias.h IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
GlobalObject.h IR: Add COMDATs to the IR 2014-06-27 18:19:56 +00:00
GlobalValue.h Add the missing hasLinkOnceODRLinkage predicate. 2014-07-30 15:57:51 +00:00
GlobalVariable.h [pr19844] Add thread local mode to aliases. 2014-05-28 18:15:43 +00:00
GVMaterializer.h Make ObjectFile and BitcodeReader always own the MemoryBuffer. 2014-06-23 21:53:12 +00:00
InlineAsm.h Reapply r215966, r215965, r215964, r215963, r215960, r215959, r215958, and r215957 2014-08-19 16:39:58 +00:00
InstIterator.h [Modules] Move InstIterator out of the Support library, where it had no 2014-03-04 10:30:26 +00:00
InstrTypes.h Add CreatePointerBitCastOrAddrSpaceCast to IRBuilder and co. 2014-07-14 17:24:35 +00:00
Instruction.def
Instruction.h AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
Instructions.h Add two helper functions: isAtLeastAcquire, isAtLeastRelease 2014-08-15 22:25:12 +00:00
InstVisitor.h [Layering] Move InstVisitor.h into the IR library as it is pretty 2014-03-06 03:23:41 +00:00
IntrinsicInst.h
Intrinsics.h TableGen: introduce support for MSBuiltin 2014-07-04 18:42:25 +00:00
Intrinsics.td Add @llvm.assume, lowering, and some basic properties 2014-07-25 21:13:35 +00:00
IntrinsicsAArch64.td Port memory barriers intrinsics to AArch64 2014-07-17 10:50:20 +00:00
IntrinsicsARM.td Fix typos in comments 2014-08-15 22:17:28 +00:00
IntrinsicsHexagon.td
IntrinsicsMips.td
IntrinsicsNVVM.td [NVPTX] Add more surface/texture intrinsics, including CUDA unified texture fetch 2014-07-17 11:59:04 +00:00
IntrinsicsPowerPC.td
IntrinsicsR600.td R600/SI: Add intrinsic for ldexp 2014-08-15 17:30:25 +00:00
IntrinsicsX86.td X86 intrinsics table - simplifies intrinsics lowering. 2014-08-24 09:19:56 +00:00
IntrinsicsXCore.td
IRBuilder.h Add scoped-noalias metadata 2014-07-24 14:25:39 +00:00
IRPrintingPasses.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LeakDetector.h [Modules] Move the LeakDetector header into the IR library where the 2014-03-04 12:46:06 +00:00
LegacyPassManager.h [C++11] Add 'override' keyword to IR library. 2014-03-05 06:35:38 +00:00
LegacyPassManagers.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
LegacyPassNameParser.h Do not register and de-register PassRegistrationListeners during 2014-06-12 00:16:36 +00:00
LLVMContext.h IR: Fix up doxygen comment for LLVMContext::diagnose 2014-08-04 21:49:15 +00:00
Mangler.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
MDBuilder.h Simplify and improve scoped-noalias metadata semantics 2014-07-25 15:50:02 +00:00
Metadata.h Add scoped-noalias metadata 2014-07-24 14:25:39 +00:00
Module.h IR: Expose Module::rbegin() and rend() 2014-07-28 21:09:32 +00:00
NoFolder.h [Modules] Move the NoFolder into the IR library as it creates 2014-03-04 12:05:47 +00:00
OperandTraits.h
Operator.h [Modules] Move GetElementPtrTypeIterator into the IR library. As its 2014-03-04 10:40:04 +00:00
PassManager.h Use range based for loops to avoid needing to re-mention SmallPtrSet size. 2014-08-24 23:23:06 +00:00
PatternMatch.h InstSimplify: Simplify trivial pointer expressions like b + (e - b) 2014-08-26 05:55:16 +00:00
PredIteratorCache.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
SymbolTableListTraits.h [C++11] More 'nullptr' conversion or in some cases just using a boolean check instead of comparing to nullptr. 2014-04-09 06:08:46 +00:00
Type.h Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
TypeBuilder.h
TypeFinder.h
Use.h Updated the link to the correct URL. 2014-04-29 13:21:05 +00:00
UseListOrder.h verify-uselistorder: Force -preserve-bc-use-list-order 2014-08-19 21:08:27 +00:00
User.h Reorder Value and User fields to save 8 bytes of padding on 64-bit 2014-06-09 23:32:20 +00:00
Value.h IR: Add Value::reverseUseList() 2014-08-01 23:28:49 +00:00
ValueHandle.h [C++] Use 'nullptr'. 2014-04-24 06:44:33 +00:00
ValueMap.h Support: add llvm::unique_lock 2014-08-23 23:07:14 +00:00
ValueSymbolTable.h
Verifier.h verify-di: Implement DebugInfoVerifier 2014-04-15 16:27:38 +00:00