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

Cannot randomize LLVM IR using llc #6

Open
romits800 opened this issue Dec 20, 2021 · 0 comments
Open

Cannot randomize LLVM IR using llc #6

romits800 opened this issue Dec 20, 2021 · 0 comments

Comments

@romits800
Copy link

Hello!
I am trying to randomize the LLVM IR representation of a program using llc but I get identical versions:

clang test.cpp  -emit-llvm -S -o test.ll
llc  test.ll -random-seed=444  -randomize-machine-registers -o test_444.s
llc  test.ll -random-seed=11   -randomize-machine-registers -o test_11.s

When running multicompiler using clang, everything works and the two variants test_444.s and test_11.s differ with
regards to the register allocation.

 clang test.cpp -frandom-seed=444 -mllvm -randomize-machine-registers -S -o test_444.s
 clang test.cpp -frandom-seed=11 -mllvm -randomize-machine-registers -S -o test_11.s

Is there any way to randomize the LLVM IR representation?
I am attaching the code test.cpp with a script run.sh that shows this behavior.
mcp.tar.gz

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

No branches or pull requests

1 participant