<!doctype html>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
<div>
Hello everyone,
<br>
</div>
<div>
<br>
</div>
<div>
I'm currently working on a project that required me to fundamentally modify certain mechanisms of the x86 backend, as well as certain functions within PrologEpilogInserter (so my changes are not confined to a single pass - e.g. they include changes to the x86RegisterInfo constructor).
</div>
<div>
In my current solution, I have added an option within llvm/include/llvm/CodeGen/CommandFlags.inc to enable my modifications (the modifications are placed within if-conditions in multiple segments of the code).
<br>This requires me to compile test code in two steps (first run clang with -emit-llvm, then run llc with my option enabled in the command line).
<br>
</div>
<div>
<br>
</div>
<div>
Now I would like to be able to enable my modification through a clang command line option. What would be the canonical way to do so and which steps do I have to take? I already looked into the dev guide, but perhaps I missed something.
<br>
</div>
<div>
<br>
</div>
<div>
I already tried using -mllvm as a workaround, but for some reason my option is not being recognized. Ultimately, I'd prefer not to rely on -mllvm anyway.
<br>
</div>
<div>
<br>
</div>
<div>
To sum up my question: I want to be able to pass a boolean command line parameter to clang and use it within certain conditional statements within multiple files of the backend.
<br>
</div>
<div>
<br>
</div>
<div>
Thank you for your help and let me know if my intent is unclear.
<br>
</div>
<div>
<br>
</div>
<div>
Oskar
<br>
</div>
</body>
</html>