Ignore:
Timestamp:
Jan 14, 2017, 3:49:56 PM (2 years ago)
Author:
nmedfort
Message:

Changes working towards simplifying accessing stream elements + some modifications to simplify include / forward declarations within the CodeGen? library.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_nvptx_builder.cpp

    r5230 r5260  
    1111#include <llvm/IR/Function.h>
    1212#include <llvm/IR/InlineAsm.h>
    13 #include <sstream>
     13#include <llvm/IR/Module.h>
    1414
    1515namespace IDISA {
     
    256256    Value * conv = CreateZExt(input, int32ty);
    257257
    258     std::ostringstream AsmStream;
    259     AsmStream << "{.reg .pred %p1; ";
    260     AsmStream << "setp.ne.u32 %p1, $1, 0; ";
    261     AsmStream << "vote.ballot.b32  $0, %p1;}";
     258    const char * AsmStream = "{.reg .pred %p1;"
     259                             "setp.ne.u32 %p1, $1, 0;"
     260                             "vote.ballot.b32  $0, %p1;}";
    262261    FunctionType * AsmFnTy = FunctionType::get(int32ty, int32ty, false);
    263     llvm::InlineAsm *IA = llvm::InlineAsm::get(AsmFnTy, AsmStream.str(), "=r,r", true, false);
     262    llvm::InlineAsm *IA = llvm::InlineAsm::get(AsmFnTy, AsmStream, "=r,r", true, false);
    264263    llvm::CallInst * result = CreateCall(IA, conv);
    265264    result->addAttribute(llvm::AttributeSet::FunctionIndex, llvm::Attribute::NoUnwind);
Note: See TracChangeset for help on using the changeset viewer.