Skip to content

Conversation

kuhar
Copy link
Member

@kuhar kuhar commented Sep 6, 2025

The instructions will be printed inside the .ll files we already dump.

.rocmasm files can be generated using the llc command, making bisecting llvm easier, since it doesn't require IREE to be in sync with MLIR and LLVM.

Because llc is not built by default, you will have to run something like ninja llc to use it from within the IREE build.

The instructions will be printed inside the `.ll` files we already dump.

`.rocmasm` files can be generated using the `llc` command, making
bisecting llvm easier, since it doesn't require IREE to be in sync with
MLIR and LLVM.

Because `llc` is not built by default, you will have to run something like
`ninja llc` to use it from within the IREE build.
@kuhar kuhar requested review from krzysz00 and Groverkss September 8, 2025 15:01
@krzysz00
Copy link
Contributor

krzysz00 commented Sep 8, 2025

If you look over at

targetMachine.reset(target->createTargetMachine(
triple, targetArch, featureStr, opt, llvm::Reloc::Model::PIC_,
std::nullopt, llvm::CodeGenOptLevel::Aggressive));
, you'll notice we use Aggressive, which, to quote the LLVM headers

  enum class CodeGenOptLevel {
    None = 0,      ///< -O0
    Less = 1,      ///< -O1
    Default = 2,   ///< -O2, -Os
    Aggressive = 3 ///< -O3
  };

So yeah, we need a -O3 in these flags to match the LLC behavior.

(Note that we use llvm::OptimizationLevel ol = llvm::OptimizationLevel::O2; earlier, so the middle-end optimization level is -O2 ... and we really should see if we can change that back to -O3 ... but the backend is at -O3)

@kuhar
Copy link
Member Author

kuhar commented Sep 9, 2025

Thanks, fixed

@kuhar kuhar enabled auto-merge (squash) September 9, 2025 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants