[lld] r222983 - [Core] Add flag to check if RoundTripPasses need to be run.

Shankar Easwaran shankare at codeaurora.org
Wed Dec 3 16:26:57 PST 2014


Thanks for the info.

Shankar Easwaran

On 12/3/2014 5:04 PM, Rui Ueyama wrote:
> I learned we are using env command in Clang tests like this.
>
> RUN: env FOO=bar clang ...
>
> It seems we could do the same thing to disable the tests per-test basis.
>
> RUN: env LLD_ROUNDTRIP_TEST= lld ...
>
> On Mon, Dec 1, 2014 at 2:20 PM, Rui Ueyama <ruiu at google.com> wrote:
>
>> I think that's arguable if that's considered as information lost. After an
>> atom is written to a new Native file and reloaded, it gets a new file name
>> because it was actually read from a different file. If a compiler outputs
>> an object file in Native format, it's the file name of an atom read from
>> the file.
>>
>> On Mon, Dec 1, 2014 at 2:14 PM, Shankar Easwaran <shankare at codeaurora.org>
>> wrote:
>>
>>> On 12/1/2014 4:02 PM, Rui Ueyama wrote:
>>>
>>>> On Mon, Dec 1, 2014 at 1:48 PM, Nick Kledzik <kledzik at apple.com> wrote:
>>>>
>>>>   On Dec 1, 2014, at 12:34 PM, Rui Ueyama <ruiu at google.com> wrote:
>>>>> That sounds like we really need a new property of Atom.
>>>>>
>>>>> 1. If we run LLD in Release build, the roundtrip passes don't run, so
>>>>> everything works fine.
>>>>> 2. If we run LLD in Debug build (and from the unit tests), the
>>>>> information
>>>>> is dropped during the round-trip conversion, and it fails.
>>>>> 3. RoundTrip tests should't drop any information.
>>>>>
>>>>> 2 and 3 conflicts.
>>>>>
>>>>>
>>>>> I have a different view.
>>>>>
>>>>> I think of those Passes as a quick way to exercise the YAML and native
>>>>> formats.  The mechanism is as if you went through the test cases and
>>>>> added
>>>>> a line which ran “ld -r” to merge all input files into one file, then
>>>>> ran
>>>>> the rest of the test with that merged input file.  That works everywhere
>>>>> except in tests that care about the name of the input file (which is now
>>>>> changed).  So, for those cases you would not do the merge step.  But
>>>>> since
>>>>> the round trip is implicit, there is no way to turn it off.  Shankar is
>>>>> adding a way to turn it off.
>>>>>
>>>>>   That doesn't sounds like a different view.
>>>> If a test fails because of the difference of an input file name, not
>>>> because the round-trip conversion drops some information, we should
>>>> disable
>>>> the round-trip test only for that test. Now I feel I understood your
>>>> suggestion in a different thread. Is there any way to override the
>>>> environment variable in the lit test? Does it allow us to write RUN:
>>>> LLD_ROUNDTRIP_TEST=0 lld <args here> ?
>>>>
>>> The filename information of the Atom is lost in the Native format.
>>>
>>> Gnu flavor needs the filename whenever the user uses a linker script (or)
>>> the user decides to know the memory map of the image.
>>>
>>> So this is needed almost all the time.
>>>
>>>
>>> Shankar Easwaran
>>>
>>> --
>>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted
>>> by the Linux Foundation
>>>
>>>


-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation




More information about the llvm-commits mailing list