diff options
| author | Dan Gohman <gohman@apple.com> | 2010-07-30 21:07:05 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-07-30 21:07:05 +0000 |
| commit | f5b1b0bfc434c5633df5855e6bd27b8fbd38e58c (patch) | |
| tree | 41b6c288fd5caa25309550991ac501b4c6250c84 /lib | |
| parent | cdc9f8802e41595c72e88214deffa118cd19b323 (diff) | |
| download | external_llvm-f5b1b0bfc434c5633df5855e6bd27b8fbd38e58c.zip external_llvm-f5b1b0bfc434c5633df5855e6bd27b8fbd38e58c.tar.gz external_llvm-f5b1b0bfc434c5633df5855e6bd27b8fbd38e58c.tar.bz2 | |
Move MaximumAlignment to be a member of the Value class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/AsmParser/LLParser.cpp | 2 | ||||
| -rw-r--r-- | lib/Transforms/InstCombine/InstCombineCalls.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index e581a69..c55a165 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -1154,7 +1154,7 @@ bool LLParser::ParseOptionalAlignment(unsigned &Alignment) { if (ParseUInt32(Alignment)) return true; if (!isPowerOf2_32(Alignment)) return Error(AlignLoc, "alignment is not a power of two"); - if (Alignment > MaximumAlignment) + if (Alignment > Value::MaximumAlignment) return Error(AlignLoc, "huge alignments are not supported yet"); return false; } diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index fdb2dd6..27ca345 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -109,9 +109,10 @@ unsigned InstCombiner::GetOrEnforceKnownAlignment(Value *V, TrailZ = std::min(TrailZ, unsigned(sizeof(unsigned) * CHAR_BIT - 1)); unsigned Align = 1u << std::min(BitWidth - 1, TrailZ); + unsigned MaxAlign = Value::MaximumAlignment; // LLVM doesn't support alignments larger than this currently. - Align = std::min(Align, MaximumAlignment); + Align = std::min(Align, MaxAlign); if (PrefAlign > Align) Align = EnforceKnownAlignment(V, Align, PrefAlign); |
