[LLVMbugs] [Bug 12833] New: EngineBuilder ignores mcpu/march/mattr parameters, and so does lli

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 15 07:31:46 PDT 2012


             Bug #: 12833
           Summary: EngineBuilder ignores mcpu/march/mattr parameters, and
                    so does lli
           Product: new-bugs
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: jfonseca at vmware.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

In LLVM 3.1, EngineBuilder is ignoring the parameters being passed to
setMArch/setMCPU/setMAttrs methods.

Consequently, mcpu/march/mattr options in command line lli tool do not work.

This change fixes it:

index 42364f9..f46674d 100644
--- a/lib/ExecutionEngine/TargetSelect.cpp
+++ b/lib/ExecutionEngine/TargetSelect.cpp
@@ -26,9 +26,9 @@
 using namespace llvm;

 TargetMachine *EngineBuilder::selectTarget() {
-  StringRef MArch = "";
-  StringRef MCPU = "";
-  SmallVector<std::string, 1> MAttrs;
+  //StringRef MArch = "";
+  //StringRef MCPU = "";
+  //SmallVector<std::string, 1> MAttrs;
   Triple TT(M->getTargetTriple());

   return selectTarget(TT, MArch, MCPU, MAttrs);

I think this is a severe functionality regression for lli. So please consider
fixing this for llvm 3.1

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list