[llvm-commits] [llvm] r89602 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Eli Friedman
eli.friedman at gmail.com
Sun Nov 22 11:57:28 PST 2009
On Sun, Nov 22, 2009 at 2:54 PM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Sun, Nov 22, 2009 at 11:16 AM, Chris Lattner <sabre at nondot.org> wrote:
>> --- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
>> +++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Sun Nov 22 10:16:48 2009
>> @@ -263,6 +263,7 @@
>> bool BasicAliasAnalysis::pointsToConstantMemory(const Value *P) {
>> if (const GlobalVariable *GV =
>> dyn_cast<GlobalVariable>(P->getUnderlyingObject()))
>> + // FIXME: shouldn't this require GV to be "ODR"?
>> return GV->isConstant();
>> return false;
>> }
>
> I don't think it legal for a non-constant to override a constant.
> (This isn't looking at the initializer.)
Erm, more precisely, it isn't legal to modify a global that is marked
constant in any module.
-Eli
More information about the llvm-commits
mailing list