[LLVMdev] Advice on CFG pre-analysis
Mike Stump
mrs at apple.com
Tue May 27 13:57:23 PDT 2008
On May 23, 2008, at 11:53 PM, Talin wrote:
> In the language I am working on, there are cases where the call flow
> graph can affect the type of a variable.
:-)
This reminds me of people that want to use CFG and the optimizer to
make:
int i; int() { if (i) return 1; else return 0; }
not warn/error that flow falls off the end. Extend that out and you
have to do arbitrarily hard things and the document the limit of what
was done, which is messy and wrong, as the next person will come along
and say, but I want this one obvious little case to work as well.
If you want to go down that path, you can, but we're gonna wave you
off. In the end, I suspect you have to replicate all the code in the
front end as it is part of the spec, not an `optimization'.
More information about the llvm-dev
mailing list