Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EngineBuilder ignores mcpu/march/mattr parameters, and so does lli #13205

Closed
llvmbot opened this issue May 15, 2012 · 2 comments
Closed

EngineBuilder ignores mcpu/march/mattr parameters, and so does lli #13205

llvmbot opened this issue May 15, 2012 · 2 comments
Labels
bugzilla Issues migrated from bugzilla

Comments

@llvmbot
Copy link
Collaborator

llvmbot commented May 15, 2012

Bugzilla Link 12833
Resolution FIXED
Resolved on May 14, 2014 06:26
Version trunk
OS All
Reporter LLVM Bugzilla Contributor

Extended Description

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

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 19, 2012

I suspect this was introduced by

commit 8e1fc56
Author: Owen Anderson resistor@mac.com
Date: Fri Mar 23 17:40:56 2012 +0000

Make it feasible for clients using EngineBuilder to capture the TargetMachine that is created as part of selecting the appropriate target.
This is necessary if the client wants to be able to mutate TargetOptions (for example, fast FP math mode) after the initial creation of the ExecutionEngine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153342 91177308-0d34-0410-b5e6-96231b3b80d8

@llvmbot
Copy link
Collaborator Author

llvmbot commented May 14, 2014

Fixed in

commit 5b2d81b
Author: Owen Anderson resistor@mac.com
Date: Mon May 21 16:57:17 2012 +0000

Make it so that the MArch, MCPU, MAttrs passed to EngineBuilder are actually used.

Patch by Jose Fonseca.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157191 91177308-0d34-0410-b5e6-96231b3b80d8

So we can close it now.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 3, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla
Projects
None yet
Development

No branches or pull requests

1 participant