[llvm-commits] [llvm] r93270 - /llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Victor Hernandez
vhernandez at apple.com
Tue Jan 12 18:07:13 PST 2010
On Jan 12, 2010, at 4:53 PM, Devang Patel wrote:
>
> On Jan 12, 2010, at 3:37 PM, Victor Hernandez wrote:
>
>> Author: hernande
>> Date: Tue Jan 12 17:37:59 2010
>> New Revision: 93270
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=93270&view=rev
>> Log:
>> Make WriteConstants() more robust against stray values in ValueEnumerator's ValueList
>
> Isn't this covering a bug if there are stray values in ValueList ?
It very well could turn out to be just that. Currently I am seeing stray function-local values in the ValueList when the global constants are getting written. I am working on getting them to not exist until incorporateFunction time, but even then, I don't know if there will be stray values while function-local constants are being written. I'll update you after some more investigation.
Victor
> -
> Devang
>>
>> Modified:
>> llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
>>
>> Modified: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp?rev=93270&r1=93269&r2=93270&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp (original)
>> +++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp Tue Jan 12 17:37:59 2010
>> @@ -688,6 +688,11 @@
>> Record.clear();
>> continue;
>> }
>> +
>> + // Ignore all values in ValueList except for Constants.
>> + if (V && (isa<Instruction>(V) || isa<Argument>(V)))
>> + continue;
>> +
>> const Constant *C = cast<Constant>(V);
>> unsigned Code = -1U;
>> unsigned AbbrevToUse = 0;
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list