[llvm] r204901 - Rejected r204899 and r204900 due to remaining test failures on cmake-llvm-x86_64-linux buildbot.

Jiangning Liu liujiangning1 at gmail.com
Thu Mar 27 22:22:24 PDT 2014


Hi Renato and Rafael,

I think there is a design level issue as I asked in my code review email
thread.

In assembly code parsing stage, the code tries to call

EvaluateAsAbsolute without knowing MCAsmLayout. I think it is unsafe and
incorrect, Originally the code simply return
ed
"
Success
"
even if EvaluateAsAbsolute returns false
.

T
he logic was

wired

, I think.

I
n
e
ncoding stage
 of MCStreamer
, we can call

EvaluateAsAbsolute to
detect if the SO is really constant, but I think it's too late to do so,
because we can do nothing except assertion failure if

EvaluateAsAbsolute
 returns false in this stage, while assertion failure implies compiler
crash.


I think the correct solution is we should introduce MCAsmLayout in assembly
parsing stage to make 

EvaluateAsAbsolute return true/false appropriately. This way, we could
detect invalid SO expression at the earliest time, and would be able to
avoid introducing assertion(compiler crash) in encoding stage.

Thanks,
-Jiangning
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140328/84171385/attachment.html>


More information about the llvm-commits mailing list