for(Ice::Inst *use : uses[loadData])
{
- for(int i = 0; i < use->getSrcSize(); i++)
+ for(Ice::SizeT i = 0; i < use->getSrcSize(); i++)
{
if(use->getSrc(i) == loadData)
{
replace(load, storeValue);
- for(int i = 0; i < addressUses.loads.size(); i++)
+ for(size_t i = 0; i < addressUses.loads.size(); i++)
{
if(addressUses.loads[i] == load)
{
}
}
- for(int i = 0; i < addressUses.size(); i++)
+ for(size_t i = 0; i < addressUses.size(); i++)
{
if(addressUses[i] == load)
{
auto &valueUses = uses[storeValue];
- for(int i = 0; i < valueUses.size(); i++)
+ for(size_t i = 0; i < valueUses.size(); i++)
{
if(valueUses[i] == store)
{
Ice::CfgNode *singleBasicBlock = node[addressUses.stores[0]];
- for(int i = 1; i < addressUses.stores.size(); i++)
+ for(size_t i = 1; i < addressUses.stores.size(); i++)
{
Ice::Inst *store = addressUses.stores[i];
if(node[store] != singleBasicBlock)
node[&instruction] = basicBlock;
definition[instruction.getDest()] = &instruction;
- for(int i = 0; i < instruction.getSrcSize(); i++)
+ for(Ice::SizeT i = 0; i < instruction.getSrcSize(); i++)
{
- int unique = 0;
+ Ice::SizeT unique = 0;
for(; unique < i; unique++)
{
if(instruction.getSrc(i) == instruction.getSrc(unique))
{
assert(!use->isDeleted()); // Should have been removed from uses already
- for(int i = 0; i < use->getSrcSize(); i++)
+ for(Ice::SizeT i = 0; i < use->getSrcSize(); i++)
{
if(use->getSrc(i) == oldValue)
{
instruction->setDeleted();
- for(int i = 0; i < instruction->getSrcSize(); i++)
+ for(Ice::SizeT i = 0; i < instruction->getSrcSize(); i++)
{
Ice::Operand *src = instruction->getSrc(i);
{
auto &uses = *this;
- for(int i = 0; i < uses.size(); i++)
+ for(size_t i = 0; i < uses.size(); i++)
{
if(uses[i] == instruction)
{
uses[i] = back();
pop_back();
- for(int i = 0; i < loads.size(); i++)
+ for(size_t i = 0; i < loads.size(); i++)
{
if(loads[i] == instruction)
{
}
}
- for(int i = 0; i < stores.size(); i++)
+ for(size_t i = 0; i < stores.size(); i++)
{
if(stores[i] == instruction)
{
#include "llvm/Support/raw_os_ostream.h"
#if defined(_WIN32)
+#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
+#endif // !WIN32_LEAN_AND_MEAN
+#ifndef NOMINMAX
#define NOMINMAX
+#endif // !NOMINMAX
#include <Windows.h>
#else
#include <sys/mman.h>
Ice::Type T(Type *t)
{
- static_assert(Ice::IceType_NUM < EmulatedBits, "Ice::Type overlaps with our emulated types!");
+ static_assert(static_cast<unsigned int>(Ice::IceType_NUM) < static_cast<unsigned int>(EmulatedBits), "Ice::Type overlaps with our emulated types!");
return (Ice::Type)(reinterpret_cast<std::intptr_t>(t) & ~EmulatedBits);
}
{
assert(sizeof(void*) == 4 && "UNIMPLEMENTED"); // Only expected/implemented for 32-bit code
- for(int index = 0; index < sectionHeader[i].sh_size / sectionHeader[i].sh_entsize; index++)
+ for(Elf32_Word index = 0; index < sectionHeader[i].sh_size / sectionHeader[i].sh_entsize; index++)
{
const Elf32_Rel &relocation = ((const Elf32_Rel*)(elfImage + sectionHeader[i].sh_offset))[index];
- void *symbol = relocateSymbol(elfHeader, relocation, sectionHeader[i]);
+ relocateSymbol(elfHeader, relocation, sectionHeader[i]);
}
}
else if(sectionHeader[i].sh_type == SHT_RELA)
{
assert(sizeof(void*) == 8 && "UNIMPLEMENTED"); // Only expected/implemented for 64-bit code
- for(int index = 0; index < sectionHeader[i].sh_size / sectionHeader[i].sh_entsize; index++)
+ for(Elf32_Word index = 0; index < sectionHeader[i].sh_size / sectionHeader[i].sh_entsize; index++)
{
const Elf64_Rela &relocation = ((const Elf64_Rela*)(elfImage + sectionHeader[i].sh_offset))[index];
- void *symbol = relocateSymbol(elfHeader, relocation, sectionHeader[i]);
+ relocateSymbol(elfHeader, relocation, sectionHeader[i]);
}
}
}
return createArithmetic(Ice::InstArithmetic::Xor, lhs, rhs);
}
- static Ice::Variable *createAssign(Ice::Operand *constant)
- {
- Ice::Variable *value = ::function->makeVariable(constant->getType());
- auto assign = Ice::InstAssign::create(::function, value, constant);
- ::basicBlock->appendInst(assign);
-
- return value;
- }
-
Value *Nucleus::createNeg(Value *v)
{
return createSub(createNullValue(T(v->getType())), v);