Like caraway , its fernlike leaves are aromatic , and are used to flavor many foods , such as gravlax ( pickled salmon ) , borscht and other soups , cream cheese and pickles . Like caraway , its fernlike leaves are aromatic and are used to flavor many foods , such as gravlax ( cured salmon ) , borscht and other soups , and pickles ( where the dill flower is sometimes used ) .