[llvm-commits] [llvm] r81116 - in /llvm/trunk: include/llvm/CodeGen/MachineConstantPool.h include/llvm/Support/PatternMatch.h lib/Analysis/ProfileInfoLoader.cpp lib/CodeGen/PBQP/Heuristics/Briggs.h lib/Target/X86/X86RegisterInfo.cpp
Duncan Sands
baldrick at free.fr
Sun Sep 6 05:56:53 PDT 2009
Author: baldrick
Date: Sun Sep 6 07:56:52 2009
New Revision: 81116
URL: http://llvm.org/viewvc/llvm-project?rev=81116&view=rev
Log:
Mark more constants unsigned, as warned about by icc (#68).
Patch by Erick Tryzelaar.
Modified:
llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h
llvm/trunk/include/llvm/Support/PatternMatch.h
llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp
llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h
llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
Modified: llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h?rev=81116&r1=81115&r2=81116&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h Sun Sep 6 07:56:52 2009
@@ -89,7 +89,7 @@
MachineConstantPoolEntry(MachineConstantPoolValue *V, unsigned A)
: Alignment(A) {
Val.MachineCPVal = V;
- Alignment |= 1 << (sizeof(unsigned)*CHAR_BIT-1);
+ Alignment |= 1U << (sizeof(unsigned)*CHAR_BIT-1);
}
bool isMachineConstantPoolEntry() const {
Modified: llvm/trunk/include/llvm/Support/PatternMatch.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PatternMatch.h?rev=81116&r1=81115&r2=81116&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/PatternMatch.h (original)
+++ llvm/trunk/include/llvm/Support/PatternMatch.h Sun Sep 6 07:56:52 2009
@@ -58,7 +58,7 @@
if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
const APInt &CIV = CI->getValue();
if (Val >= 0)
- return CIV == Val;
+ return CIV == static_cast<uint64_t>(Val);
// If Val is negative, and CI is shorter than it, truncate to the right
// number of bits. If it is larger, then we have to sign extend. Just
// compare their negated values.
Modified: llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp?rev=81116&r1=81115&r2=81116&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp (original)
+++ llvm/trunk/lib/Analysis/ProfileInfoLoader.cpp Sun Sep 6 07:56:52 2009
@@ -26,10 +26,10 @@
//
static inline unsigned ByteSwap(unsigned Var, bool Really) {
if (!Really) return Var;
- return ((Var & (255<< 0)) << 24) |
- ((Var & (255<< 8)) << 8) |
- ((Var & (255<<16)) >> 8) |
- ((Var & (255<<24)) >> 24);
+ return ((Var & (255U<< 0U)) << 24U) |
+ ((Var & (255U<< 8U)) << 8U) |
+ ((Var & (255U<<16U)) >> 8U) |
+ ((Var & (255U<<24U)) >> 24U);
}
static unsigned AddCounts(unsigned A, unsigned B) {
Modified: llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h?rev=81116&r1=81115&r2=81116&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h (original)
+++ llvm/trunk/lib/CodeGen/PBQP/Heuristics/Briggs.h Sun Sep 6 07:56:52 2009
@@ -118,7 +118,7 @@
if (!add) {
udTarget = 1;
- dir = -1;
+ dir = ~0;
}
EdgeData &linkEdgeData = g.getEdgeData(edgeItr).getHeuristicData();
Modified: llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp?rev=81116&r1=81115&r2=81116&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp Sun Sep 6 07:56:52 2009
@@ -645,7 +645,7 @@
// }
// [EBP]
MFI->CreateFixedObject(-TailCallReturnAddrDelta,
- (-1*SlotSize)+TailCallReturnAddrDelta);
+ (-1U*SlotSize)+TailCallReturnAddrDelta);
}
if (hasFP(MF)) {
More information about the llvm-commits
mailing list