[LLVMdev] endian independence

Jay Foad jay.foad at gmail.com
Mon Oct 27 11:16:27 PDT 2008


> Ok, if you want to address this in LLVM, the place to start is to make
> the optimizers completely targetdata-independent.  The best way to do
> this (IMO) is to change passes to use "getAnalysisToUpdate" instead of
> "getAnalysis/AddRequired" on TargetData.  Then, change opt to only add
> targetdata to the passmgr if a target data string exists in the module.
>
> This would make the optimizers transparently take advantage of TD when
> available, but gracefully handle the cases when it isn't.

This sounds a bit all-or-nothing. In my case, I know everything about
target data *except* for the endianness, and I don't think I'd want to
disable any significant optimisations that depend on other aspects of
the target data. But maybe I'm an unusual case!

Thanks,
Jay.



More information about the llvm-dev mailing list