classic-flang-llvm-project icon indicating copy to clipboard operation
classic-flang-llvm-project copied to clipboard

LLVM :: Assembler regression test failures

Open bryanpkc opened this issue 4 years ago • 3 comments

Two regression tests are currently failing on the release_100 candidate (PR #1):

Failing Tests (2):
    LLVM :: Assembler/invalid-diglobalvariable-empty-name.ll
    LLVM :: Assembler/invalid-diglobalvariable-missing-name.ll

They are caused by the following commits:

  • flang-compiler/llvm@5c217c2
  • flang-compiler/llvm@e35c28b

Reverting these commits allow the regression tests to pass.

At -O3 -g, Flang will generate a DIGlobalVariable named _BLNK_ for an unnamed COMMON block, so it is not clear to me why we need to allow an empty or missing name in a DIGlobalVariable.

@schweitzpgi Do you have an example program that breaks without these commits?

bryanpkc avatar Aug 25 '20 14:08 bryanpkc

No, I don’t have one at hand.

I don’t believe that a (fake) name is actually required by ELF and the reasoning was that some tools may want to create anonymous symbols. Obviously, using fake symbol names will get around the existing LLVM imposed restrictions.

-- Eric

From: Bryan Chan [email protected] Sent: Tuesday, August 25, 2020 7:53 AM To: flang-compiler/classic-flang-llvm-project [email protected] Cc: Eric Schweitz [email protected]; Mention [email protected] Subject: [flang-compiler/classic-flang-llvm-project] LLVM :: Assembler regression test failures (#2)

Two regression tests are currently failing:

Failing Tests (2):

LLVM :: Assemberl/invalid-diglobalvariable-empty-name.ll

LLVM :: Assemberl/invalid-diglobalvariable-missing-name.ll

They are caused by the following commits:

Reverting these commits allow the regression tests to pass.

At -O3 -g, Flang will generate a DIGlobalVariable named BLNK for an unnamed COMMON block, so it is not clear to me why we need to allow an empty or missing name in a DIGlobalVariable.

@schweitzpgihttps://github.com/schweitzpgi Do you have an example program that breaks without these commits?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/flang-compiler/classic-flang-llvm-project/issues/2, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFIOX7IIMJF7OKYMTO5CFJLSCPF4BANCNFSM4QKX5O2A.

schweitzpgi avatar Aug 25 '20 16:08 schweitzpgi

@bryanpkc @shivaramaarao @alokkrsharma We are trying to reduce the delta with upstream llvm and find that the commits mentioned above by @bryanpkc change the name field of GlobalVariables to be empty and optional (https://github.com/flang-compiler/classic-flang-llvm-project/blame/release_13x/llvm/lib/AsmParser/LLParser.cpp#L4960). Is there any plan to either upstream this change or alternatively remove this change and adjust flang accordingly?

kiranchandramohan avatar Jan 31 '22 17:01 kiranchandramohan

Once Alok's https://github.com/flang-compiler/flang/pull/1228 (to remove the DIGlobalVariable metadata associated with the common block) is merged, we can remove this difference wrt upstream llvm.

jinisusan avatar Feb 23 '22 15:02 jinisusan