Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: lib/Analysis/ValueTracking.cpp

Issue 7792066: [llvm] Conditionally include target intrinsics, based on --enable-target Base URL: https://llvm.org/svn/llvm-project/llvm/trunk/
Patch Set: cleanups Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Analysis/ConstantFolding.cpp ('k') | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- ValueTracking.cpp - Walk computations to compute properties --------===// 1 //===- ValueTracking.cpp - Walk computations to compute properties --------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 // 9 //
10 // This file contains routines that help analyze properties that chains of 10 // This file contains routines that help analyze properties that chains of
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) { 673 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(I)) {
674 switch (II->getIntrinsicID()) { 674 switch (II->getIntrinsicID()) {
675 default: break; 675 default: break;
676 case Intrinsic::ctpop: 676 case Intrinsic::ctpop:
677 case Intrinsic::ctlz: 677 case Intrinsic::ctlz:
678 case Intrinsic::cttz: { 678 case Intrinsic::cttz: {
679 unsigned LowBits = Log2_32(BitWidth)+1; 679 unsigned LowBits = Log2_32(BitWidth)+1;
680 KnownZero = APInt::getHighBitsSet(BitWidth, BitWidth - LowBits); 680 KnownZero = APInt::getHighBitsSet(BitWidth, BitWidth - LowBits);
681 break; 681 break;
682 } 682 }
683 #if defined(TARGET_ENABLED_X86)
683 case Intrinsic::x86_sse42_crc32_64_8: 684 case Intrinsic::x86_sse42_crc32_64_8:
684 case Intrinsic::x86_sse42_crc32_64_64: 685 case Intrinsic::x86_sse42_crc32_64_64:
685 KnownZero = APInt::getHighBitsSet(64, 32); 686 KnownZero = APInt::getHighBitsSet(64, 32);
686 break; 687 break;
688 #endif // TARGET_ENABLED_X86
687 } 689 }
688 } 690 }
689 break; 691 break;
690 } 692 }
691 } 693 }
692 694
693 /// ComputeSignBit - Determine whether the sign bit is known to be zero or 695 /// ComputeSignBit - Determine whether the sign bit is known to be zero or
694 /// one. Convenience wrapper around ComputeMaskedBits. 696 /// one. Convenience wrapper around ComputeMaskedBits.
695 void llvm::ComputeSignBit(Value *V, bool &KnownZero, bool &KnownOne, 697 void llvm::ComputeSignBit(Value *V, bool &KnownZero, bool &KnownOne,
696 const TargetData *TD, unsigned Depth) { 698 const TargetData *TD, unsigned Depth) {
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 UI != UE; ++UI) { 1788 UI != UE; ++UI) {
1787 const IntrinsicInst *II = dyn_cast<IntrinsicInst>(*UI); 1789 const IntrinsicInst *II = dyn_cast<IntrinsicInst>(*UI);
1788 if (!II) return false; 1790 if (!II) return false;
1789 1791
1790 if (II->getIntrinsicID() != Intrinsic::lifetime_start && 1792 if (II->getIntrinsicID() != Intrinsic::lifetime_start &&
1791 II->getIntrinsicID() != Intrinsic::lifetime_end) 1793 II->getIntrinsicID() != Intrinsic::lifetime_end)
1792 return false; 1794 return false;
1793 } 1795 }
1794 return true; 1796 return true;
1795 } 1797 }
OLDNEW
« no previous file with comments | « lib/Analysis/ConstantFolding.cpp ('k') | lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698