[llvm-commits] [llvm] r93270 - /llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
Devang Patel
dpatel at apple.com
Tue Jan 12 18:28:23 PST 2010
On Jan 12, 2010, at 6:07 PM, Victor Hernandez wrote:
>
> 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.
hmm.. stray values are not good, we should flag these values.
> I'll update you after some more investigation.
You may want to keep this patch in your local tree while you sort out function-local values patch.
-
Devang
>
> 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